Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-09-09 17:08:17

Klikk
New Member
Registered: 2006-07-14
Posts: 9

rel canonical and default pagination

Is there any way to set correct rel canonical link for ?pg=2 and forward? At the moment I have my DTD_head form set to figure out correct canonical link for every page except for “default” pagination pages. Is there any way to check for which page and insert that into some <txp:if……. tag? I have looked around in the reference, searched here and searched the plugins but can’t find anything that apply to this. Am I missing something stupidly obvious here or…? Any help or hints are greatly appreciated :)

regards
Tim

Offline

#2 2011-09-09 17:25:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: rel canonical and default pagination

Not quite sure if it helps with your problem but

<txp:page_url type="pg" />

will return the page number you are on (textbook entry on txp:page_url).


TXP Builders – finely-crafted code, design and txp

Offline

#3 2011-09-09 20:50:15

Klikk
New Member
Registered: 2006-07-14
Posts: 9

Re: rel canonical and default pagination

jakob wrote:

Not quite sure if it helps with your problem but

<txp:page_url type="pg" />

will return the page number you are on (textbook entry on txp:page_url).

Thanks Jakob, missed that attribute :) Half way there I guess, now let’s see if I can make a meaningful check around it.

Offline

Board footer

Powered by FluxBB