Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-03-20 22:33:41
- tinchex
- New Member
- Registered: 2009-03-20
- Posts: 6
Create categories with same name under different sections
Hi everybody, i’m highly new on textpattern knowledge. I would like to know if there’s a way to create categories with the same name under different sections, but each category containing different articles. for example:
section a: -category “alpha” (articles 1, 2, 3) -category “beta” (articles 4, 5, 6) -category “gamma” (articles 7, 8, 9)
section b: -category “alpha” (articles 10, 11, 12) -category “beta” (articles 13, 14, 15) -category “gamma” (articles 16, 17, 18)
section c: -category “alpha” (articles 19, 20, 21) -category “beta” (articles 22, 23, 24) -category “gamma” (articles 25, 26, 27)
Thanks in advance.
Martin
Offline
#2 2009-03-20 23:25:17
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Create categories with same name under different sections
Yes, of course you can do that. You just have to create each category once, then write your articles in their own sections and assign the category.
You only need to keep in mind that Txp uses the front page by default to display category lists (= list of articles in a category), and that would display all category articles belonging to all sections that are set to be displayed on the front page.
You won’t want to do that, so you can use the section pages instead to display category lists. Use the section
attribute in tags that create links to category pages, like <txp:category_list />, <txp:category />, <txp:category1 /> and <txp:category2 />. Your category pages’ URLs will look like site.com/section-name/?c=category-name.
A <txp:article />
tag on your page template will automatically display the right articles because it is context sensitive.
Offline
#3 2009-04-01 23:05:52
- tinchex
- New Member
- Registered: 2009-03-20
- Posts: 6
Re: Create categories with same name under different sections
thank u it was really helpful
Offline