Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-07-09 12:08:32

coleh
Member
From: Edinburgh, UK
Registered: 2007-08-16
Posts: 28
Website

Customising display of category listings

Kinda related to my previous post, is there a way via the core textpattern build or via a plugin that i can control the display of a category list via forms?

Drawing a blank —-

Cheers

Cole


Jack of all trades, Doctor of one

Offline

#2 2009-07-09 13:50:10

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

Re: Customising display of category listings

Hi Cole. Can you expand slightly?
Waht kind of control are you looking for?
If you are looking for consistent urls for example and for some excluded categories check out this txp tip


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-07-09 14:39:28

coleh
Member
From: Edinburgh, UK
Registered: 2007-08-16
Posts: 28
Website

Re: Customising display of category listings

Hi Yiannis

Sorry for ambiguity and thanks for link.
You have highlighted why I am being such an idiot – had forgotten that category list could be used as a container.

Time to rephrase my query perhaps. To be more specific in this particular case I wanted to display a grouping of article by categories along the lines of those listed in this forum thread/post

However, what I wanted to also do was precede this with a list of categories (showing only those that featured articles) that instead of providing links to pages would provide links to an id defined for each of the category groupings further down the page, eg linking to #category-name or similar.

The idea was that if I could control the display of a category list using a form then this could be quite easily achieved with something along the lines of:

<a href="#link-<txp:category />"><txp:category title="1" /></a>

I can achieve this using category_list as a container but that then shows all categories relating to the section listed (and not just those for which articles exist). However, if I try this using cbs_category_list as a container to specifically exclude those categories without articles then the listing just gives me the default category permalink.

Maybe should relocate this query over to the cbs_category_list plugin thread…

Thanks for feedback though,

Cole


Jack of all trades, Doctor of one

Offline

#4 2009-07-09 19:09:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

Re: Customising display of category listings

… not just those for which articles exist.

The tip I have posted to you makes use of txp:variable which checks for articles in the categories before generating the listing. The forum thread which is where the particular code was developed (all kudos to Els here) might spark some more ideas for you.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB