Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-01-07 10:18:36
- Paxton84
- New Member
- Registered: 2008-01-07
- Posts: 6
Another blog article problem...
I currently have two articles posted on my blog page (http://www.paxtontatum.com/blog). When I click the read more link (for either article) provided through the use of a form, I am taken to the “individual article page”, but both articles are posted. How do I restrict which article should appear?
I am using to forms to post the articles to my blog site, one provides the excerpt text w/ link (“blog_entry_excerpt”) and a second form provides the full body text of the named article (“blog_entry”).
Here is the code for the blog page:
<txp:output_form form=“meta” />
<body>
<div id=“page_wrapper”>
<div id=“header”>
<div id=“about”> <a href=”/about”></a> </div>
<div id=“portfolio”> <a href=”/portfolio”></a> </div>
<div id=“links”> <a href=”/links”></a> </div>
<div id=“blog”> <a href=”/blog” class=“active”></a> </div>
</div>
<div id=“content”><div id=“main_content”>
<txp:if_individual_article> <txp:article_custom form=“blog_entry” section=“blog” limit“1”/>
<txp:else />
<txp:article_custom form=“blog_entry_excerpt” section=“blog” limit=“4”/>
</txp:if_individual_article>
</div>
<div id=“side_content”></div>
</div> <div id=“footer”><txp:output_form form=“footer” />
</div></div>
</body>
</html>
Thanks for the help (if the above form code is needed, please ask).
Offline
Re: Another blog article problem...
It’s because you’re using article_custom instead of <txp:article />
on an individual article page. <txp:article_custom />
is not context-sensitive (ie. it has no idea you’re on a single article).
Offline
#3 2008-01-07 15:59:04
- Paxton84
- New Member
- Registered: 2008-01-07
- Posts: 6
Re: Another blog article problem...
Jm,
Thanks for the expert and very simple solution to my site problem…somehow I easily missed this concept from the Textpattern Solutions book at 4 this morning. I changed the <txp:article_custom> tag to just <txp:article> and it works fine!
Thanks!
~Paxton84
Offline
Pages: 1