Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shlomif opened this issue Jan 8, 2015 · 2 comments
Open

Comments

@shlomif
Copy link

shlomif commented Jan 8, 2015

Hi all,

the pages on http://perldancer.org/ currently all share the same <title> element, but it should be different for each page and meaningful.

Regards,

-- Shlomi Fish

@szabgab
Copy link
Contributor

szabgab commented Jan 12, 2015

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

@shlomif
Copy link
Author

shlomif commented Jan 12, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants