Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-12-13 05:03:16
- tswhite
- New Member
- Registered: 2011-12-13
- Posts: 1
Linking a List of Articles to the Main Body of a Page?
Relatively new to Textpattern – maybe it’s obvious and I’m just not seeing it?
I’m creating a blog and trying to put in a sidebar that lists all articles by date. No problem. But when you click on the article you want to go to, it attempts to generate the article in the same div as the list rather than replacing the current article in the main body of the page. Is there some sort of link target that will fix this?
I’ve looked, but most of the search results I get are irrelevant.
Thanks, -T
Offline
Re: Linking a List of Articles to the Main Body of a Page?
Try something like:
<txp:article_custom section="blog" label="Recent Articles" labeltag="h2" wraptag="ul" class="recent" break="li" ><txp:permlink><txp:title /></txp:permlink></txp:article_custom>
in your side bar code block and something like <txp:article limit="5" />
in the main section code block where you want the article to appear. Note that the default article form will be called by <txp:article /> unless you specify something else.
Hope that helps.
Offline