Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-09-21 01:45:37
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Article, excerptview to fullview. Permlinks?
Hi!
Im currently working with article lists. More specificly i have a list of articles, using a form displaying titles and excerpts, enough for a short version of an article. When i click the article title I get to the article and can comment etc.
The problem is, when i click the article i still get the title and the excerpt. I, of course, want to see the entire article when i click it. i was thinking of solving this by linking to another form inside of the article list form, but it doesnt seem to be the right way. The permlink tag doesn’t take form attributes either so i cannot tell the link to link to another form.
Anyone got a que about this? Maybe im going at this from the wrong way.
Thanks alot.
Offline
#2 2008-09-21 02:33:18
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Article, excerptview to fullview. Permlinks?
You have to follow this scheme for each page:
<txp:if_article_list>
<txp:article form="your_list_form" />
</txp:if_article_list>
<txp:if_individual_article>
<txp:article form="your_single_article_form" />
</txp:if_individual_article>.
Of course you have to create the two forms called above.
the first would be something like:
<txp:permlink><txp:title /></txp:permlink>
<txp:excerpt />
and the second:
<txp:body />
Hope this helps.
Offline
#3 2008-09-21 09:18:30
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Re: Article, excerptview to fullview. Permlinks?
Helped alot, thank you!
I had no idea you should use conditions for weather its an article list or a single article. Much appreciated.
Offline
#4 2008-09-21 10:58:06
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article, excerptview to fullview. Permlinks?
Distrahera wrote:
I had no idea you should use conditions for weather its an article list or a single article.
You can, but you don’t have to :)
<txp:article form="your_single_article_form" listform="your_list_form" />
Yet another way:
<txp:article form="your_multi_purpose_form" />
‘your_multi_purpose_form’:
<txp:if_article_list>
<txp:permlink><txp:title /></txp:permlink>
<txp:excerpt />
<txp:else />
<txp:title />
<txp:body />
</txp:if_article_list>
Last edited by els (2008-09-21 11:01:09)
Offline
#5 2008-09-21 11:18:24
- Distrahera
- Member
- Registered: 2008-09-20
- Posts: 30
Re: Article, excerptview to fullview. Permlinks?
Actually that seems to be an even better way, less code.
Thanks =)
Offline