Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-24 19:43:31

maryse
New Member
Registered: 2006-08-24
Posts: 6

Read the FAQ-Still can't get the full article to show in some cases.

Hello! :)

I read the “How do I use a different page layout for individual articles and article lists“question
http://textpattern.com/faq/25/how-do-i-use-a-different-page-layout-for-individual-articles-and-article-lists

As well as the “How do I show only an excerpt in article lists” question
http://textpattern.com/faq/24/how-do-i-show-only-an-excerpt-in-article-lists

But I still can’t get something to work so I must be doing something wrong…

I have a Default Form which includes txp:body
and an Excerpt Form which includes txp:excerpt

When I put this in my page, everything works great:
(txp:article form=“default” listform=“excerpt” /)
I have the list of articles that are supposed to show up on the front page with excerpts and when I click on the link I see the full article in the next page.

But now I want to show two excerpts of articles from a category called Chroniques and then a list of three recent articles (starting at number 3) from the same category.

So I used the following:

(txp:article_custom form=“default” limit=“2” category=“Chroniques” section=“Arts” sortby=“Posted” sortdir=“desc” listform=“excerpt” /)

(txp:dru_recent_articles limit=“2,3” break=”“ wraptag=“p” category=“Chroniques” sortby=“Posted”/)

It looks the way I want it to look but when I click to view the full article, it doesn’t work anymore. I get that in the 2nd tag there is no form and listform but when I tried it, it didn’t work. And it doesn’t work in the first one either.

Can’t the form and listform work in these tags? And if not, how can I accomplish this?

I tried using these (txp:if_individual_article) (/txp:if_individual_article) and (txp:if_article_list) (/txp:if_article_list) but I couldn’t make it work. so again, I’m probably doing something wrong…

Thanks for any help!

maryse

Offline

#2 2006-08-24 19:58:41

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Read the FAQ-Still can't get the full article to show in some cases.

There is not listform attribute for article_custom. Be sure to read the difference between article and article_custom too. You could use some conditionals:

<pre>
&lt;txp:if_article_list&gt; &lt;!— when in an article list, txp:article returns 10 the articles in the current section —&gt; &lt;txp:article form=“excerpt” limit=“999” /&gt; &lt;!— txp:article_custom returns articles outside of the section (context-insensitive). For an article listing in a section, use txp:article. —&gt; &lt;txp:article_custom category=“chroniques” form=“excerpt” limit=“2” section=“arts” /&gt;
&lt;txp:else /&gt; &lt;!— if we are on an individual article, display the article. If you leave off the form attribute, the form, default, is used. —&gt; &lt;txp:article /&gt;
&lt;/txp:if_article_list&gt;
</pre>

Offline

#3 2006-08-26 03:32:47

maryse
New Member
Registered: 2006-08-24
Posts: 6

Re: Read the FAQ-Still can't get the full article to show in some cases.

Thank you very much! It solved my problem. :)

Offline

Board footer

Powered by FluxBB