Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] omit article from article_custom
Is there a way of omitting the current article from an article_custom
generated list?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] omit article from article_custom
Maybe I should add what code I am currently using:)
<txp:article_custom label='Other <txp:section />' labeltag="h4" section='<txp:section />' limit="30" wraptag="ul" class="submenu">
<li<txp:if_article_id> class="active"</txp:if_article_id>><txp:permlink><txp:title /></txp:permlink></li>
</txp:article_custom>
I am aware that I can use display:none
for the active class but I would rather not.
I like the way related_articles
works but as I am not using categories, the tag returns no results.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] omit article from article_custom
If you don’t mind potentially showing 29 items instead of 30 then, you could just use the if_article_id conditional you already have there, but instead for the class, use it to wrap the whole contents. I.e.
<txp:article_custom>
<txp:if_article_id>
<!--
Yep, it's this one, skip me.
-->
<txp:else />
<!--
Nope, it ain't, display this one:
-->
<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:if_article_id>
</txp:article_custom>
Offline
Re: [SOLVED] omit article from article_custom
Way to go!. This was much simpler than I thought. Thanks!
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] omit article from article_custom
Yep, that’s a good example for the documentation of if_article_id
and worth a ‘related’ link in article_custom
.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline