Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Show a message when no articles exist on category landing page
Hi,
I am using rss_unlimited_categories to file articles and display them on a category page. I don’t know how to show a custom message, for example, “No articles filed under this category”, when someone lands on a category page with no articles.
I’d really appreciate it, if someone could me.
Cheers,
Husain
Last edited by husainhk (2012-09-04 06:28:15)
Offline
#2 2012-09-04 06:07:46
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: Show a message when no articles exist on category landing page
See plugin chh_if_data
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)
Offline
Re: Show a message when no articles exist on category landing page
Thanks makss!
Do you have the plugin .TXT file handy? My ISP is blocking the download page for some reason, could be the URL.
EDIT: Managed to download the file and works like magic … Thanks so much!
Last edited by husainhk (2012-09-04 06:22:53)
Offline
Re: Show a message when no articles exist on category landing page
Pluginless solution: wrap your articles in a variable (mind the linebreaks).
<txp:variable name="articles"><txp:article_custom ... >
...
</txp:article_custom></txp:variable>
<txp:if_variable name="articles" value="">
No articles here
<txp:else />
<txp:variable name="articles" />
<txp:variable name="articles" value="" />
</txp:variable>
Offline