forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: zapotex on October 22, 2011, 06:35:03 pm

Title: Page number (x/y) in title for SEO purposes
Post by: zapotex on October 22, 2011, 06:35:03 pm
Hi all!

I'm trying to make sure I don't have pages with duplicate titles in my gallery. When, in a category, there are more albums than fit in a page, the two pages:

http://...&page=1
http://...&page=2

have the exact same title. I was wondering whether it was possible to create a custom token {PAGENUMBER}, that is:

"" (empty) if the albums fit in a single page
" - (x/y)" if the albums do not fit a single page

Then, in template.html, I will use:

<title>{TITLE}{PAGENUMBER}</title>

Is it possible? Thanks so much!
Title: Re: Page number (x/y) in title for SEO purposes
Post by: Αndré on October 22, 2011, 09:07:51 pm
I've currently no access to my testbed, that's why I can give you just general advices. Please search the board of how using custom tokens in Coppermine, we had some threads recently (you'll have to edit the pageheader function). In that function you have to read the page parameter from the URL, get the number of albums in that category / the number of files in that album and then calculate the number of displayed items. Now you're able to compare that values and determine if you need to extend the page title.

If you cannot solve that yourself, just let me know.
Title: Re: Page number (x/y) in title for SEO purposes
Post by: kubizo on October 23, 2011, 09:38:26 am
Hi André! Thanks a lot for the suggestion! I will try!

Have a great day!

K