Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-11-12 19:24:58
- sersam
- New Member
- Registered: 2005-03-08
- Posts: 6
list only cat1 categories?
How do I list only cat1 (or cat2, not together!) non empty categories inside current section (maybe with article counter) on list page? Looks like rss_suparchive_bycat, but it (useartcat2=“1”) doesn’t work on list pages, it works only on single article.
One thing: I want hyperlink points to current section/category, not to home/category/.
Last edited by sersam (2005-11-12 20:06:38)
Offline
Re: list only cat1 categories?
I haven’t tried this but how about something like:-
<code>
<ul>
<txp:article form=“formName” limit=“9999” />
</ul></code>
<br />
in your page template then create the form (formName) like so:-
<code>
<txp:if_different>
<li><a href=”<txp:site_url /><txp:section />/category/<txp:category1 />”><txp:category1 title=“1” /></a></li>
</txp:if_different></code>
<br />
There won’t be a count and I’m not sure about empty categories. The article tag is context-sensitive but categories aren’t tied to sections so it may well pick up all articles in a category regardless though you are linking to a section page so I don’t know. Suck it and see. :)
Then again, if you really MUST use a plug-in try this one.
Last edited by thebombsite (2005-11-13 00:58:17)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2005-11-13 03:54:52
- sersam
- New Member
- Registered: 2005-03-08
- Posts: 6
Re: list only cat1 categories?
Thank you, thebombsite!
It’s really working.
Small change: /category/ to /?c=
Or may be there is a plug-in for this case?
zem_rewrite doesn’t work
Offline
Re: list only cat1 categories?
Oh you’re using messy URLs? Didn’t realise that. Sorry.
zem_rewrite??!! Are you trying to replace me with a plug-in? I pour my brains out all over this screen and you want a plug-in? I wish nobody had invented plug-ins. Damn pesky things. They stop you using your brains you know. They are a conspiracy to keep human beings ignorant!
All you need is TXP and a little thought and patience. Have a nice day. :grin:
Glad it’s working. I wasn’t 100% on that though I have used something similar for another output. :)
Last edited by thebombsite (2005-11-13 05:05:42)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#5 2005-11-13 05:12:25
- sersam
- New Member
- Registered: 2005-03-08
- Posts: 6
Re: list only cat1 categories?
No, I don’t want a plug-in:)
But: I use section/id/title mode, and this mode doesn’t support /categories/ inside current section. It supports /?c= for this case and main_page/categories in general. May be I’m wrong?
Offline
Re: list only cat1 categories?
Errr – let me check. Nope you are correct. My bad. See! I said I wasn’t 100%. :) I need more info on your other problem. I’ll move across.
Last edited by thebombsite (2005-11-13 05:40:23)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1