Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-09-02 15:38:45
- Bellezza
- New Member
- Registered: 2009-06-08
- Posts: 5
Putting an article in two sections?
I’ve looked for an answer to this question all over and cannot seem to find an answer. I’m looking for a way to make an article available in two sections. I have two sections for articles and occasionally they overlap. The only thing I can find is that I duplicate the article, but I don’t want to have to do that because then they both show up on the front page. Any ideas? Are there any plug ins for this?
Thanks!
Offline
#2 2009-09-02 18:08:08
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Putting an article in two sections?
It’s not possible to assign an article to two sections. Categories would be more appropriate for this use.
As a workaround, you could create categories with the same names as the sections for this purpose, and on your section page, beside the regular article tag, use <txp:article_custom category='<txp:section />' />
to call the articles from other sections. It wouldn’t be possible though to display them inside the regular article list.
Offline
#3 2009-09-02 18:43:24
- Bellezza
- New Member
- Registered: 2009-06-08
- Posts: 5
Re: Putting an article in two sections?
Is there a way that I can write it so it only shows that category from a certain section? For instance, if I write just one category, it duplicates all the ones that are in that section and category already.
I.E.
I have the sections Legal Filings and Press Room. Then there is the category Press Releases. Sometimes an article should be under both sections, so I just put it under the appropriate Section and then file under Press Releases. So, can I write an if statement that would maybe take ONLY the Press Release from Legal Filings to display on the Press Room page without duplicating the ones that are already in there under PressRoom-> Press Releases?
Make sense?
Offline
#4 2009-09-02 20:50:33
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Putting an article in two sections?
Yes, that would be possible, but it depends on how often and in how many places this is going to happen. If you only need articles from section Legal Filings in category Press Releases to appear now and then in section Press Room, then <txp:article_custom section="legal-filings" category="press-releases" />
would suffice. But if this situation can happen in more sections and categories you would need quite a lot of conditional tags I guess.
That’s why I was thinking about using a second category (you can only do that if you’re not using category2 at the moment). If you create categories with the same names as your sections, you could (using your example) write your article and put it in section Legal Filings, assign category1 Press Releases and for category2 choose the category that matches the section in which you want to display it (Press Room). <txp:article_custom category='<txp:section />' />
then will display on your section page Press Room all articles in whatever section that have Press Room as category2.
Offline
Pages: 1