Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
resolved: category cloud that leads to articles ? I checked plugins
I tried ‘mir_category_cloud’, but was unable to figure out how to get it to wrap. Currently it puts one category on a line. It has a ‘wraptag’ keyword, but I couldn’t get it to work.
I also tried ‘arc_popular_category_cloud’, but I couldn’t get it to work at all.
Basically I am looking for a category cloud, the user clicks on a category listed in the front page of my site’s cloud, and they then see a list of articles using that category.
Is there a plugin or textpattern markup that does this ?
Thanks !
Last edited by JimJoe (2014-04-28 13:37:26)
Offline
#2 2014-04-27 04:24:53
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: resolved: category cloud that leads to articles ? I checked plugins
<txp:category_list />
, see more …
Offline
Re: resolved: category cloud that leads to articles ? I checked plugins
Thanks ! I’ll check into that.
Offline
Re: resolved: category cloud that leads to articles ? I checked plugins
I still get a column of categories, even empty ones. My attempts at wrapping the list hasn’t worked.
children set to zero worked.
Offline
Re: resolved: category cloud that leads to articles ? I checked plugins
Ah, break =” , “ did the trick to wrap it. Clicking on a category that has articles leads to an articles list.
But I do need a way to not show empty categories.
category cloud at the bottom of the page. I probably need to lighten up the page background color to.
Last edited by JimJoe (2014-04-27 14:45:48)
Offline
Re: resolved: category cloud that leads to articles ? I checked plugins
JimJoe wrote #280418:
But I do need a way to not show empty categories.
Hi Jim, I think that you can achieve what you want if you replace the <txp:category_list break="," />
with:
<txp:variable name="hasarticles"><txp:article_custom limit="1" category='<txp:category />' wraptag="" break="" /></txp:variable>
<txp:category_list wraptag="" break=",">
<txp:if_variable name="hasarticles" value="">
<txp:else />
<txp:category title="1" link="1" />
</txp:if_variable>
</txp:category_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: resolved: category cloud that leads to articles ? I checked plugins
Didn’t make any difference. I have 18 articles in the articles list, but no 11, so at most I should see 17.
Offline
#8 2014-04-27 22:07:42
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: resolved: category cloud that leads to articles ? I checked plugins
What is your Textpattern version? Maybe this single tag variable works:
<txp:variable name="hasarticles" value='<txp:article_custom category=''<txp:category />'' limit="1" />' />
Offline
Re: resolved: category cloud that leads to articles ? I checked plugins
Hi folks,
the <txp:variable name="hasarticles" />
definition is misplaced, it should be inside <txp:category_list>...</txp:category_list>
, and actually unnecessary:
<txp:category_list wraptag="" break=",">
<txp:article_custom limit="1" category='<txp:category />'>
<txp:category title="1" link="1" />
</txp:article_custom>
</txp:category_list>
There still will be two problems:
- comma-separated empty items
- performance
The best solution is not to create “empty” categories.
Online
Re: resolved: category cloud that leads to articles ? I checked plugins
I am using txp 4.5.5. I created all of the categories I’ll be using with this site so I could make sure they were nested under the parent ones they belonged to.
@GugUser, no text shows up.
@etc, it works fine, and exactly the way I want it to. I took out the comma. Multiple word categories, both words are joined by an underscore. As you note, the comma shows as a large number of them.
Offline
Re: resolved: category cloud that leads to articles ? I checked plugins
Page loading time is slower as you mention. Only returns one article, but I hesitate in increasing the limit to all of the articles.
Offline
#12 2014-04-28 13:51:39
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: resolved: category cloud that leads to articles ? I checked plugins
JimJoe wrote #280437:
@GugUser, no text shows up.
I meant to replace the container tag variable with the single tag variable.
This works and filters the categories with articles.
<txp:variable name="hasarticles" value='<txp:article_custom category=''<txp:category />'' limit="1" />' />
<txp:category_list wraptag="" break=",">
<txp:if_variable name="hasarticles" value="">
<txp:else />
<txp:category title="1" link="1" />
</txp:if_variable>
</txp:category_list>
Offline