Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
If articles > n then ...
Hello,
I have to check whether a section contains 2 or more articles, in order to dynamically display a submenu.
Is that feasible? thanks
Offline
Re: If articles > n then ...
Try this:
<txp:variable name="show_submenu" value='<txp:article_custom section="your-section" limit="1" offset="2">flag</txp:article_custom>' />
<txp:if_variable name="show_submenu" value="" />
<!-- nothing here -->
<txp:else />
<!-- submenu code here -->
</txp:if_variable>
TXP Builders – finely-crafted code, design and txp
Offline
Pages: 1