Title on Stats page

I see in wrapper we have the title tag given as

<title>{$list_name} - {$header}</title>

Which is how it should be.

However, on individual stats pages I'd like to have the individual website title come first, in the HTML title tag.

ie

<title>{$title} - {$list_name}</title>

I don't even need the - Stats - part of {$header} to appear in the page title on individual (website) stats pages.

Any suggestions?
 

Mark

Administrator
Staff member
indeed, the way this is generated at the moment could be handled better. I'm thinking something like this (outline below if your feeling adventurous and are interested in making this yourself, otherwise I will work on this after 0.7 is released):

we make a new tag for creating stronger titles:
{$page_title}

then in wrapper we use: <title>{$page_title}</title>

Then with the magic of plugins we generate the value for {$page_title} like so:

/plugins/seo/stats_build_page.php
PHP:
$TMPL['page_title'] = $TMPL['title']. ' - '. $TMPL['list_name'];
Also need to generate titles for ranking pages

/plugins/seo/rankings_compile_stats.php
PHP:
$TMPL['page_title'] = $TMPL['list_name']. ' - '. $TMPL['header'];
 

Mark

Administrator
Staff member
good stuff :) for the other pages we can construct the titles in the same way using the hook locations for those sections (join_build_form and user_cp_global_start). OR since the seo value of these pages is quite low, we can use a more generic rule like

$TMPL['page_title'] = $TMPL['header'];

I'll have a look and see as time allows what the best approach would be.
 
Maybe for Join page:

$TMPL['page_title'] = 'Add URL to '. $TMPL['list_name'];

And for User Control Panel:

$TMPL['page_title'] = $TMPL['list_name']. ' - '. $TMPL['header'];
 

Mark

Administrator
Staff member
for your join alternative we would need to use language variable like so:

PHP:
$TMPL['page_title'] = $LNG['add_url_to'].'  '. $TMPL['list_name'];
then update the language files to include this variable.

PHP:
$LNG['add_url_to'] = 'add url to';
 
Top