Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2025-02-28 11:42:14
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
newer/older tags doesn't disappear
Textpattern version: 4.8.8 (9262ba8728e343fca434a9453030f57d)
PHP version: 8.1.31
my code
<txp:if_individual_article>
...
<txp:else />
<txp:article frontpage="0" limit="25" time="any" sort="Posted desc" wraptag="div" break="div" class="col-content-2 veerud-5">
...
</txp:article>
<div id="navigation">
<p><txp:newer><i class="fas fa-angle-left nav-link"></i> <txp:text item="Uuemad" /></txp:newer>
<txp:older showalways="0"><txp:text item="Vanemad" /> <i class="fas fa-angle-right nav-link"></i></txp:older></p>
</div>
</txp:if_individual_article>
but the newer/older buttons always visible, doesn’t disappear. take a look
Offline
Re: newer/older tags doesn't disappear
The newer and older tags are for navigating lists of articles. You have your tags inside <txp:if_individual_article>
so they won’t work as intended.
If you want to navigate between articles use <txp:link_to_next />
and <txp:link_to_prev />
. Or if you’re trying to navigate lists, move your navigation code outside the <txp:if_individual_article>
container.
That should help.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: newer/older tags doesn't disappear
You might also want to look at how the default theme deals with non-existent next and previous items, e.g. here for article lists and here for next and previous articles.
TXP Builders – finely-crafted code, design and txp
Offline
#4 2025-03-02 08:25:57
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Re: newer/older tags doesn't disappear
Bloke wrote #339165:
The newer and older tags are for navigating lists of articles. You have your tags inside
<txp:if_individual_article>
so they won’t work as intended.
there were article tag inside article tag. i did not mentioned that this was form code and in template i had:
<txp:article form="myform" />
changed it to <txp:output_form form="myform" />
and it started to work.
sorry and thank you guys!
Offline
Pages: 1