Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-15 15:41:57

thiskey
New Member
Registered: 2008-09-10
Posts: 3

Related articles (can't get it working!)

Hi everyone,

I’m new to Textpattern (I’ve been trying it out for about a week). I was trying out Drupal for a few days before that and I’m glad I made the transition! This is a much nicer environment for designers, would you agree?

Anyway, I’ve had many problems and have solved them all, bit by bit (although it’s been a struggle). But I’m stuck with the <txp:related_articles /> tag.

Quite simply, I want to list all the articles in a section (just the article titles), and this list will appear on all the articles in that section. What I envisage is a “staff profiles” section with lots of articles, each one for a different member of staff. Each of these staff profiles will contain a link to every other one (i.e. a list of all the articles in that section).

I understand the <txp:related_articles /> tag is the way to do this. I’ve tried placing the tag (with variations) it in some articles, but nothing shows up (there is no error message; there is just nothing where I would have expected the list to appear). This is the same regardless of whether articles are “sticky” or “live”. I’ve also tried placing the tag in the side bar of the default page, but this doesn’t work either.

I presume I’m missing something obvious. Can anyone help?

Thanks

Tom

Offline

#2 2008-09-15 16:23:35

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Related articles (can't get it working!)

<txp:related_articles /> will display articles in the same category, not section. To do that you can use <txp:article_custom /> instead, together with asy_wondertag.

<txp:asy_wondertag>
<txp:article_custom section="<txp:section />" form="yourform" />
</txp:asy_wondertag>

Offline

#3 2008-09-15 20:06:21

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Related articles (can't get it working!)

Nice one Els – thanks very much! :-)

Offline

#4 2008-09-15 20:33:21

thiskey
New Member
Registered: 2008-09-10
Posts: 3

Re: Related articles (can't get it working!)

Thanks Els. I’ve got it working for sections with live articles, but not for “sticky” articles. I’m doing everything the same for the sticky articles (i.e. pasting the appropriate code in the sticky page) but nothing appears. Any ideas?

I get the feeling in general that things don’t work quite as well for sticky articles as they do for live articles… do you know if that’s true?

Thanks

Tom

Offline

#5 2008-09-15 20:37:53

thiskey
New Member
Registered: 2008-09-10
Posts: 3

Re: Related articles (can't get it working!)

Oops, I’ve got it!!! Ignore last message. I suddenly thought of adding status=“sticky” to the code on the sticky pages and it’s worked a treat. Sorry, I’m a bit slow.

Thanks again,

Tom

Offline

Board footer

Powered by FluxBB