Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-01 22:47:39

carrotrope
Member
From: Edinburgh
Registered: 2007-03-16
Posts: 39

<txp:if_first_article> and <txp:if_last_article> problems

Hi,

I have the following code to display an individual article drawn from a section, complete with some next/previous links to navigate through other individual articles contained in a separate php file:

<txp:if_individual_article> <txp:article form=“bigbook” pgonly=“0” /> <txp:php>include(‘menu.php’);</txp:php>
<txp:else /> …</txp:if_individual_article>

I want to use <txp:if_first_article> and <txp:if_last_article> in the embedded menu.php file to show a greyed-out next/previous link if there is no next/previous article to link to. However, when I use either tag and look at the last or first articles, nothing appears? Can anyone suggest why this might be happening?

Best,
Jez

Offline

#2 2009-08-02 00:20:41

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

Re: <txp:if_first_article> and <txp:if_last_article> problems

if_first_article and if_last_article only work in article lists. There’s not much sense in putting them inside if_individual_article tags…
Have a look at the showalways attribute for the link_to_next and link_to_prev tags to achieve what you want.

Offline

Board footer

Powered by FluxBB