Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Display section on all pages (Latest News)
Hi guys,
I want to display a Latest News section on all of my pages; is this possible? I’ve added a section called Latest with my articles in, and I’d like to show the most recent on every page.
Any help would be great,
Many thanks,
Carl
Offline
Re: Display section on all pages (Latest News)
Not difficult, you just need to use the article_custom tag to output content from your “Latest” section. Something like this:
<txp:article_custom section="latest" limit="5" form="your_form_name" />
Alternatively, instead of using a form, you could use the tag in container format:
<txp:article_custom section="latest" limit="5">
<txp:excerpt />
<p><txp:posted /></p>
anything else you want can go here...
</txp:article_custom>
If you use <txp:excerpt />
, it has an enclosing <p>
tag by default.
Edit: <txp:excerpt /> wrapped in p tags by mistake.
Last edited by jstubbs (2011-11-14 01:16:06)
Offline
Re: Display section on all pages (Latest News)
Thanks Jonathan,
The first tip worked a treat!
Cheers,
Carl
Offline