Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Getting Page Number in Title tag for category pages

Quote Reply
Getting Page Number in Title tag for category pages
Can you please let me know how to get Page Number of category pages (if multiple span pages exits) in category template.

I would like to use it in Category title tag because google is reporting duplicate title's if I have more than couple of category pages.

I know we can use "title" tag but in sub categories it is showing the name of father category as well which I don't want.

Thanks.
Quote Reply
Re: [cassandra] Getting Page Number in Title tag for category pages In reply to
Hi,

Are you using static pages, or dynamic? (with or without mod_rewrite)

I just had a look on our installation - and it would be possible to get the page number by checking the value of "g" when called via page.cgi - but I'm not so sure about with static pages :/

It would be a good tag for GT to add to future version though - maybe <%category_page_num%> or something.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [cassandra] Getting Page Number in Title tag for category pages In reply to
Hm, can you try please <%paging.current_page%>, what is the output?

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [Andy] Getting Page Number in Title tag for category pages In reply to
Hi Andy,

I am using Static pages without Mod_Perl, but with mod_rewrite.

Thanks,

Last edited by:

cassandra: Jan 25, 2008, 9:19 PM
Quote Reply
Re: [eupos] Getting Page Number in Title tag for category pages In reply to
 
Hi Eupos,

This tag <%paging.current_page%>, Is giving me the page number thanks,

How to make it display like (page: 2) if more than one page.

Thanks.
Quote Reply
Re: [cassandra] Getting Page Number in Title tag for category pages In reply to
Well for one of my categories paging contains:

Code:
{
'current_page' => '3',
'max_hits' => '5',
'num_hits' => '34',
'page' => '4/',
'page_format' => '1'
};

So basically you can check if current_page eq num_hits.

Hope this helps.



Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins