Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-12 22:13:42

djahughes
Member
From: MK | UK
Registered: 2004-12-10
Posts: 19
Website

Previous/Next Entries or Previous/Next Article Title Navigation

Greetings TextPattern gurus

I come seeking enlightenement once more.

On my site davidhughes.org I have links to next and previous articles when viewing the site by homepage pg=2 and so on.

What I don’t have and would like is links on an individual article to the previous and next articles by their title. There is a tag for it but I’m guessing I need one of those funky conditional tags?

The code on my default page is thus

<div id=“content”>
<txp:if_section name=”,article”>
<txp:if_category>
<txp:article limit=“99” />
<txp:else />
<txp:if_search>
<txp:article limit=“99” />
<txp:else />
<txp:article limit=“2” />
<div class=“sub_nav”>
<div class=“alignleft”><txp:older>« previous entries</txp:older></div>
<div class=“alignright”><txp:newer>next entries »</txp:newer></div>
</div>
</txp:if_search>
</txp:if_category>
</txp:if_section>
</div>

Many thanks in advance,


David Hughes
davidhughes.org

Offline

#2 2007-04-12 22:55:28

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Previous/Next Entries or Previous/Next Article Title Navigation

That would be something like this:

<txp:if_individual_article>
<div class="alignleft"><txp:link_to_prev><txp:prev_title /></txp:link_to_prev></div>
<div class="alignright"><txp:link_to_next><txp:next_title /></txp:link_to_next></div>
<txp:else />
<div class="alignleft"><txp:older>« previous entries</txp:older></div>
<div class="alignright"><txp:newer>next entries »</txp:newer></div>
</txp:if_individual_article>

Offline

#3 2007-04-15 10:49:02

djahughes
Member
From: MK | UK
Registered: 2004-12-10
Posts: 19
Website

Re: Previous/Next Entries or Previous/Next Article Title Navigation

Perfect!

Thanks very much… again!


David Hughes
davidhughes.org

Offline

Board footer

Powered by FluxBB