Advertisement
LittleFox94

Untitled

Apr 16th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. * "view_name"
  2.  
  3. The "view_name" hook is called before the filename of the view
  4. template is built and allows you to override the name.
  5.  
  6. This feature has been added to allow usage of locale-specific
  7. templates, but it could be used for any purpose.
  8.  
  9. hook view_name => sub {
  10. my ($view_name_ref) = @_;
  11. $$view_name_ref = "en-US/$$view_name_ref"; # prefix the view name with our current locale
  12. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement