Justin Hunter > Reaction > Reaction::Manual::Cookbook

Download:
Reaction-0.002005.tar.gz

Annotate this POD

CPAN RT

New  1
Open  1
Stalled  1
View/Report Bugs
Source  

NAME ^

Reaction::Manual::Cookbook - Miscellaneous recipes

RECIPES ^

These should include some hopefully useful tips and tricks!

Display

These would typically go in your /root directory along with your other templates.

Alternating listview row styles with CSS

Filename: listview

  [%
  
  PROCESS base/listview;
  
  row_block = 'listview_row_fancy';
  
  BLOCK listview_row_fancy;
  
    IF loop.count % 2 == 1;
      attrs.class = 'dark';
    ELSE;
      attrs.class = 'light';
    END;
  
    INCLUDE listview_row;
  
  END;
  
  %]

Displaying heading on action forms

Filename: form_base

  [%
  
  PROCESS base/form_base;
  
  main_block = 'form_base_control_fancy';
  
  BLOCK form_base_control_fancy;
  
    action_class = self.action.meta.name.split('::').pop;
    '<h3>'; action_class.split('(?=[A-Z])').join(' '); '</h3>';
    INCLUDE form_base_control;
  
  END;
  
  %]

Controllers

Things

Models

Stuff

AUTHORS ^

See Reaction::Class for authors.

LICENSE ^

See Reaction::Class for the license.

syntax highlighting: