You are not logged in.
This tag may be used to determine whether some contained Txp tags output any data, allowing the conditional output of accompanying static markup, like a header or a “no articles found” message.
<txp:chh_if_data>
<h3>Here's an article list</h3>
<txp:article_custom category="Nogo" />
<txp:else />
<p>article_custom had nothing to say.</p>
</txp:chh_if_data>
Offline
Offline
Very smart and useful. Thanks.
Offline
this solves something that I’ve been wishing I’d thought of for a while now. when you have no results for a search, it outputs a blank page. now, when there’s no matching keywords from a search, I can put in there:
No Search Results Found
Please try another search
just wrap it around the if_individual_article txp tag. thanks!
Fine then, I’ll just make a hit counter myself.
Offline
Thanks, definitely useful. I employ it to conditionally show article thumbs or a neutral placeholder image depending on their presence.
Robert
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline
I wanted to use this plugin to control the output the category links, because when I don’t assign a category2 it outputs an empty a element, and I don’t want that to happen.
So I need something along these lines: if there is a category2 assigned output it, if there isn’t, output nothing. Can this be done?
Offline
Very, very useful. But it breaks (for me) with your <code>chh_related_articles</code> plugin.
This is my code:
<code>
<txp:chh_if_data>
<div class=“events”>
<h3>Aktuelle Termine von <txp:title /></h3>
<ul>
<txp:chh_related_articles form=“event” time=“future” relation=“keywords” section=“Veranstaltungen” custommode=“list” />
</ul>
</div> <!— /.events —>
<txp:else />
<p>Zur Zeit liegen uns keine Termine vor.</p>
</txp:chh_if_data>
</code>
Ahhh, wait …. I see … ;-)
I use two TXP-Tags inside <code>chh_if_data</code>. May be there could be something like this:
<code><txp:chh_if_data tag=“chh_related_articles”></code>
But even without this, it is a useful plugin. Thanks for this.
Last edited by Freshmango (2006-02-12 16:50:05)
<a href=“http://dennisfrank.info” title=“Dennis Frank gestaltet – Portfolio” style=“display: block; background:#efefef; color: #545454; float: left; padding: .5em; border: 1px none #9f9f9f; text-decoration: none;”><span style=“border-bottom: 1px solid #9f9f9f;”>Dennis Frank portfolio</span></a>
Offline