perldancer-website icon indicating copy to clipboard operation
perldancer-website copied to clipboard

Pages on http://perldancer.org/ should have meaningful <title> contents.

Open shlomif opened this issue 11 years ago • 2 comments

Hi all,

the pages on http://perldancer.org/ currently all share the same

element, but it should be different for each page and meaningful. <p>Regards,</p> <p>-- Shlomi Fish</p>

shlomif avatar Jan 08 '15 12:01 shlomif

Most of the pages are autogenerated from their templates. I am not sure how to set their titles.

szabgab avatar Jan 12 '15 15:01 szabgab

ack gave me:

views/layouts/main.tt
5:      <title><% if title %><% title %><% else %>Dancer - Perl Web Framework for easy and fun webapp development<% end %></title>

So I think the place to add it is lib/PerlDancer.pm under:

# Add last tweet to template params
hook before_template_render => sub {
    my $t = shift;
    $t->{last_tweet} = latest_tweet();
    $t->{this_year} = 1900 + (localtime)[5];
};

Maybe there's a better way.

shlomif avatar Jan 12 '15 15:01 shlomif