Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-08-26 14:30:03

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Void Categories not-listed. Howto.

How to get listed only categories containing articles. At present I can’t find any example, although time ago, I remember, I have already read howto get that.
TNX

Offline

#2 2015-08-26 18:20:13

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Void Categories not-listed. Howto.

Perhaps the zem_popup_cat plugin is what you’re looking for.

Offline

#3 2015-08-26 19:28:08

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Void Categories not-listed. Howto.

Or adi_cat_menu: When I read …

adi_cat_menu will produce a menu of categories and their articles.
[…]
new attribute: ‘list_empty_cats’

… I’m quite sure that it previously did only list those categories that had articles assigned. And Adi won’t have removed that previous behaviour.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2015-08-27 00:04:07

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Void Categories not-listed. Howto.

Bongo-man wrote #294371:

How to get listed only categories containing articles. At present I can’t find any example, although time ago, I remember, I have already read howto get that.
TNX

At present the download of this plugin is not available, anywhere they tell it produce a pop-up. I don’t need to have the categories listed in another window.

adi_cat_menu:

About this plugin, I’ve tried it, but list_empty_cats doesn’t work. If = 0 displays all the categories; if=1, it doesn’t display anything. Besides I can’t integrate the script in the complex expression I was using (a clickable category-menu, that displays article-lists – by selected category – in the center of the page).

I tought could be available a solution by means of a TXP tag.

Anyway thank you very much.

Last edited by Bongo-man (2015-08-27 00:16:04)

Offline

#5 2015-08-27 00:38:59

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Void Categories not-listed. Howto.

<txp:category_list>

<txp:variable name="cat-has-article" value='<txp:article_custom category=''<txp:category />'' limit="1" />' />

<txp:if_variable name="cat-has-article" value="">
	<!-- What happens if hasn't artilce, maybe empty -->
	<txp:else />
	<!-- What happens if has one or more artilces -->
</txp:if_variable>

</txp:category_list>

Offline

#6 2015-08-28 04:40:43

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Void Categories not-listed. Howto.

Thank you very much! It works good.

Last edited by Bongo-man (2015-08-28 04:41:07)

Offline

Board footer

Powered by FluxBB