Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-27 22:47:13

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

If/Then "Link to Next/Previous"

Is there a way to set up a variant of the <txp:link_to_next> tag so that I have text before or after it (“Next Article:”)? I tried adding a label to no effect, and I can’t have text outside the tag because it sits alone on the most recent piece from each section.

Any help would be greatly appreciated!

Offline

#2 2007-02-27 23:13:23

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: If/Then "Link to Next/Previous"

If I understand your question correctly, you should be using txp:link_to_next as a container tag. This should allow you to do as you describe?

Offline

#3 2007-02-27 23:15:16

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

Re: If/Then "Link to Next/Previous"

rsilletti wrote:

If I understand your question correctly, you should be using txp:link_to_next as a container tag. This should allow you to do as you describe?

This is what I have right now:

<p><txp:link_to_next ><txp:next_title /></txp:link_to_next></p>

I tried putting a label on next_title to no avail.

Offline

#4 2007-02-27 23:18:32

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: If/Then "Link to Next/Previous"

<p><txp:link_to_next >Next Title :<txp:next_title /></txp:link_to_next></p> ?
It should treat the entire enclosed statement as a single thing.

Offline

#5 2007-02-27 23:25:28

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

Re: If/Then "Link to Next/Previous"

rsilletti wrote:

<p><txp:link_to_next >Next Title :<txp:next_title /></txp:link_to_next></p> ?
It should treat the entire enclosed statement as a single thing.

It does – but the text “Next Article:” is now part of the link. I’d prefer it just be text.

Offline

#6 2007-02-27 23:36:07

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: If/Then "Link to Next/Previous"

Hmm… catch22 there I think. The pagination tags that you are using are the only ones sensitive to which article you are on that I know of.

On second thought, you might look at if_first_article , I wouldn’t rule it out altogether.

Try <p><txp:if_first_article>Next Title :</txp:if_first_article><txp:link_to_next ><txp:next_title /></txp:link_to_next></p>

or rather :( <p><txp:if_first_article><txp:else />Next Title :</txp:if_first_article><txp:link_to_next ><txp:next_title /></txp:link_to_next></p>

Last edited by rsilletti (2007-02-27 23:43:22)

Offline

Board footer

Powered by FluxBB