Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Page number (x/y) in title for SEO purposes  (Read 2304 times)

0 Members and 1 Guest are viewing this topic.

zapotex

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Page number (x/y) in title for SEO purposes
« 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!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Page number (x/y) in title for SEO purposes
« Reply #1 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.
Logged

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: Page number (x/y) in title for SEO purposes
« Reply #2 on: October 23, 2011, 09:38:26 am »

Hi André! Thanks a lot for the suggestion! I will try!

Have a great day!

K
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.