Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-30 22:28:59

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

LinkToNext in head AND body

Is there a way to use link_to_next in both the head and body of a page? I can manage to use it in the head. However, if I also have the link in the body, it messes up.


BB6 Band My band
Gud One My blog

Offline

#2 2006-10-31 00:53:14

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: LinkToNext in head AND body

please post some code examples.


A hole turned upside down is a dome, when there’s also gravity.

Offline

#3 2006-10-31 01:53:09

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: LinkToNext in head AND body

Turn off auto append comments, then see this and this.

Offline

#4 2006-10-31 02:52:33

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: LinkToNext in head AND body

If you’re using 4.0.4 (and you should…) you can use link_to_next in your page wherever you want. Something like:

<txp:if_individual_article>
	<txp:article pgonly="1" />

	<link rel="prev" href="<txp:link_to_prev />" />

	<link rel="next" href="<txp:link_to_next />" />
</txp:if_individual_article>

Offline

#5 2006-10-31 18:49:30

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: LinkToNext in head AND body

Thanks everyone! I found that by putting <code>
<link rel=“home” title=“home” href=”<txp:link_to_home />” />
<link rel=“prev” title=“prev” href=”<txp:link_to_prev />” />
<link rel=“next” title=“next” href=”<txp:link_to_next />” /> </code>
in the head and pgonly=“1” with my article, it all works fine.

I had been putting <code><link rel=“next” title=“next” href=”<txp:link_to_next /></txp:link_to_next>” />” /> </code>to make the head work and missing the pgonly on the article.

In case anyone was wondering, I have read that putting those links in the head makes for better accessibility for people with mobiles, screen readers and non-mouse assistive technologies, although I haven’t tried any of these. Cheers!

Oh, and I didn’t have to turn off auto append :-)

Last edited by zero (2006-10-31 18:51:16)


BB6 Band My band
Gud One My blog

Offline

Board footer

Powered by FluxBB