Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
getting list of acticles in a section
Can anyone tell me what I’m doing wrong here?
<txp:article_custom form="article_listing" pgonly="0" section="news-local-links" sort="Title asc" />
kicks out a list of all the articles in the section “news-local-links”
but when I’m in the section news-local-links this below renders blank:
<txp:php>
global $sect;
$sect = "<txp:section />";
echo '<txp:article_custom form="article_listing" pgonly="0" section="$sect" sort="Title asc" />';
</txp:php>
Shouldn’t <txp:section />
be getting the current section name that I’m in? I want to be able to use one article form across a few different pages and sections and display a list when ever this form is used.
Offline
#2 2009-10-14 16:10:00
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: getting list of acticles in a section
this will probably do what you want:
<txp:article_custom form="article_listing" section='<txp:section />' sort="Title asc" />
Note: you can leave out the pgonly="0"
, it’s the default.
Offline
Re: getting list of acticles in a section
That worked like a charm! thanks!
Offline
Re: getting list of acticles in a section
so now that I have this working great (thank you Els), is there a way to not show the current article in the list? I’ve been rackin’ my brain on a solution for this most of the day and keep coming up blank.
Offline
#5 2009-10-19 23:43:15
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: getting list of acticles in a section
Take a look at what (again) Els did here with the if_article_id tag and article_custom as a container tag.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: getting list of acticles in a section
That did it! You guys are awesome!
Offline
Pages: 1