Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
One article, 2 sections
Hey – without tripping the duplicate content bug, how do I get 1 article to appear in 2 sections?
Offline
#2 2008-07-25 03:16:08
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: One article, 2 sections
Since an article can only be assigned to one section, you would need to use <txp:article_custom /> to pull in articles from another section.
For instance, if your article is assigned to section_1 and you want it to appear in section_2 you could either use that tag in a different page template specific to section_2 or conditionals <txp:if_section /> in a unified template like so:
<txp:if_section name="section_2">
<txp:article_custom form="your_form" section="section_1" />
</txp:if_section>
Offline
Re: One article, 2 sections
I’ve recently wanted to do the same thing.
Sometimes an article does belong in two sections. for example : – Max Mosley in Motor Sport becomes World News.
I decided to set an article on Mr Mosley’s libel action as World News but would have liked to have had it in Motor Sports too.
As this is an occasional unpredictable event, coding won’t work. Unless you’re prepared to maintain a form with lots of various <txp:if statements that would have to be run on every page to check for these exceptions – I’m not, it’s not elegant and there’s an overhead on every page, if the list was to grow over a few years … it could get very messy.
Short of rewording the article title and actually posting it twice.
(This has the drawback of it appearing in my latest post lists twice and also splitting any comments)
(I’m not bothered about duplicate content – I think the word penalised is wrong – I believe only one page is indexed)
I can’t see a solution.
I’m waiting until the article I mentioned is out of my top 20 latest posts. Then I’ll duplicate it into Motor Sports with the original date.
Last edited by geoff777 (2008-07-25 09:09:42)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
#4 2008-07-25 11:49:40
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: One article, 2 sections
Geoff, if this is a situation that occurs on a regular basis, then categories would be far more suitable than sections to organize your content.
Offline
#5 2008-07-25 11:56:29
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: One article, 2 sections
Els wrote:
Geoff, if this is a situation that occurs on a regular basis, then categories would be far more suitable than sections to organize your content.
Yes, I agree. Also note that article_custom offers a high level of control over exactly what articles get listed.
Offline
#6 2008-07-25 12:32:23
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: One article, 2 sections
masa wrote:
Also note that article_custom offers a high level of control over exactly what articles get listed.
An example:
Create a custom field named ‘other_section’. If you need to add a second ‘section’ to your article, enter the section name in this custom field. On your section page (e.g. World News):
<txp:asy_wondertag>
<txp:article_custom other_section="<txp:section />" />
</txp:asy_wondertag>
…and when 4.0.7 comes you won’t even need asy_wondertag :)
Offline
Re: One article, 2 sections
Thanks Els & Masa
I use <txp:article_custom … a lot.
I’ll stick to duplicating as it is quite an infrequent occurrence usually when some major sportsperson or celeb steps out of line. ;-)
Any news on 4.0.7 ?
It’s great to have new features and a more efficient core and parser. On the downside a lot of plugins can stop working which can be a problem if your site depends on them.
I’ll set 4.0.7 up on a test site and have a play when it’s available for download.
:-)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
#8 2008-07-26 21:44:09
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: One article, 2 sections
geoff777 wrote:
Any news on 4.0.7 ?
Check out the devs’ weblog
No definite release dates have been announced, but I think Ruud hinted at late sommer/early autumn. The new parser and the ability to select and manipulate multiple images or files just like articles are huge leaps forward.
Offline
Pages: 1