Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-02 21:32:35

jmart
Member
Registered: 2008-08-25
Posts: 68

how to show a list of articles by name

I’m trying to show a list of articles for a particular section. And then you click on the article to read the full entry.

For example, when they land on article 13, I want article 38 and 42 to show by their title only. Click on their title and it’ll take you to the full entry. Unfortunately, when they click on article 13, nothing shows up. Here is what I have;

<txp:if_article_id id="13">
    <h1>Case Studies</h1>
     <txp:output_form form="case-studies" />
      <txp:else />
    <txp:if_article_id id="38,42">
     <txp:output_form form="article" />
</txp:if_article_id>
</txp:if_article_id>	

case studies form:

<h3><txp:permlink><txp:title /></txp:permlink></h3>

article form:

<h1 class="pagetitle"><txp:title /></h1>
<txp:body />

Last edited by jmart (2009-09-02 21:35:52)

Offline

#2 2009-09-02 21:57:59

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

Re: how to show a list of articles by name

You need to use <txp:article /> or <txp:article_custom /> instead of <txp:output_form />. Are you using this code in your page template or in an article form? If on the page, <txp:if_article_id> is not going to work unless you wrap the entire code block in <txp:if_individual_article> tags.

Offline

Board footer

Powered by FluxBB