Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-06-09 18:56:42
- RepoPrez
- Member
- Registered: 2008-03-01
- Posts: 10
linking categories with sections
I am doing some research into several CMS and I would love to use TXP as I have used it before. I have searched all over (just maybe not well enough..) and have yet to find a clear solution to problem I might have.
I want to be able to link several categories with a specific section. The idea being that a user can add content, chose a respective section, and then a category, and all of the articles under that specific category can then be listed for navigation.
Hopefully I did not confuse you. haha. but if need be I can clarify.
Thanks in advance for the help!
Offline
#2 2009-06-11 12:22:52
- RepoPrez
- Member
- Registered: 2008-03-01
- Posts: 10
Re: linking categories with sections
can anyone help me?
…. or at least let me know if I can be more clear, or even guide me in the right direction?
I really do appreciate it. :)
Offline
Re: linking categories with sections
I want to be able to link several categories with a specific section. The idea being that a user can add content, chose a respective section, and then a category, and all of the articles under that specific category can then be listed for navigation.
Hi RepoPrez, this comes out of the box
regarding: all of the articles under that specific category can then be listed for navigation. check out the related_articles tag.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2009-06-11 12:50:23
- RepoPrez
- Member
- Registered: 2008-03-01
- Posts: 10
Re: linking categories with sections
this might be a good time to clarify, because after reading about the tag I am still a little bit confused.
I guess what I am trying to understand is if there is truly a way if a user adds his/her own category, add his/her own articles, is there a way to have the article links automatically grouped by category in the nav?
It seems it could be possible, but I think I am just slow going this morning. haha.
Offline
Re: linking categories with sections
RepoPrez wrote:
this might be a good time to clarify, because after reading about the tag I am still a little bit confused.
Hi RepoPrez
The related articles tag is article specific. ie it returns a list of articles which belong to the same category as the one on the screen.
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: linking categories with sections
RepoPrez wrote:
[is there] a way if a user adds his/her own category, add his/her own articles
I hope I’m not misinterpreting your request here. If you assign a user sufficient rights, they can add categories to the Categories tab on the admin side; these become selectable in the Write tab. When you write an article you choose its section and assign it up to 2 categories. Once that assignment is made, the tags like <txp:article />
, <txp:article_custom />
, <txp:related_articles />
, <txp:category />
, and <txp:category_list />
help you to display content from various sections/categories.
is there a way to have the article links automatically grouped by category in the nav?
Your nav is however you design it. You can use category_list to offer a list of links to articles of a particular category. You can also use the category tag to show various category properties. Note that tag has two attributes this_section
and section
which should allow you to limit the categories shown to either the current section or the given section, respectively. These tags should give you enough tools to “link several categories with a specific section”, albeit indirectly via the articles themselves.
Does that help at all?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#7 2009-06-11 14:29:30
- RepoPrez
- Member
- Registered: 2008-03-01
- Posts: 10
Re: linking categories with sections
that makes it much more clearer. Thanks all. :) much appreciated.
Offline
Re: linking categories with sections
RepoPrez wrote:
I want to be able to link several categories with a specific section.
Bloke wrote:
Note that tag has two attributes
this_section
andsection
which should allow you to limit the categories shown to either the current section or the given section, respectively.
Bloke’s answer is correct (of course :D ) regarding displaying on the front end.
If you are asking whether you can assign specific categories to specific sections on the back end – ie once the user picks section1, then only a limited subset of categories would be available for the user to chose from, then I believe you would need a plugin.
I can see where some people may want the latter in order to eliminate user error.
Last edited by maverick (2009-06-11 17:01:09)
Offline
Re: linking categories with sections
ie once the user picks section1, then only a limited subset of categories would be available for the user to chose from, then I believe you would need a plugin.
I can see where some people may want the latter in order to eliminate user error.
that’s one of my only frustrations with Textpattern, and I still hesitate to build my nav with categories because of that.
Offline
Re: linking categories with sections
Perhaps sed_section_fields (and glz_custom_fields)?
On the back end – sed_section_fields allows you to limit which custom fields show based on section. glz_custom_fields lets you have unlimited and defined custom fields. Then build your navigation using those on the front end?
And/or modify sed_section_fields into a sed_section_categories?
Last edited by maverick (2009-06-12 02:00:52)
Offline
#11 2009-06-12 17:27:43
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: linking categories with sections
You could also give a look to the adi_cat_menu plugin.
I want to be able to link several categories with a specific section. The idea being that a user can add content, chose a respective section, and then a category, and all of the articles under that specific category can then be listed for navigation.
Easily done with these plugin …
Put this on your page :
<txp:adi_cat_menu article_attr='sort="title asc"' this_section="1" section_sensitive="1" categories='<txp:category_list parent="9-cours" exclude="9-cours" wraptag="" break=","><txp:category /></txp:category_list>' />
- to list here all the categories and the articles who belong to the active section, remove the categories=… part.
- with the exact code above, you limit the display to the childs of the “9-cours” category.
Offline
Pages: 1