Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-08-06 19:28:36
- deronsizemore
- Member

- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Form not displaying H2 text for some reason
I’ve got a section on my site where I’ve got “recent posts” for all recent articles on the homepage.
I’m using this code in my HTML template.
<code>
<txp:article_custom form=“recent_posts” offset=“3”/>
</code>
<br />
and here is the code for my form that I’m using, which is called “recent_posts”.
<code>
<h2>Recent Posts</h2>
<ul>
<li><txp:permlink><txp:title /></txp:permlink></li>
</ul>
</code>
<br />
If you check out the site I’m working on: <a href=“http://www.kentuckgolfing.com”>Kentucky Golfing</a> you can see that under the “recent pictures” section where “recent posts” should be, there is nothing. there should be at least the H2 text showing with no posts yet since I have the offset set to 3.
Offline
Re: Form not displaying H2 text for some reason
Try adding a section attribute (ex: txp:article_custom section="blog")
Offline
#3 2006-08-06 21:56:32
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Form not displaying H2 text for some reason
He wants from all sections, not just one.
…there should be at least the H2 text showing…
No, there shouldn’t be. You’ve placed that in the article form, which would only get used if there was something would display. Do:
page:
<h2>Recent Posts</h2>
<ul>
<txp:article_custom offset="3" form="recent_posts" />
</ul>
form, “recent_posts”:
<li><txp:permlink><txp:title /></txp:permlink></li>
Offline
#4 2006-08-07 02:09:05
- deronsizemore
- Member

- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: Form not displaying H2 text for some reason
Ah, thanks Mary. That’s actually what I had, but I thought I would try to be smart and clean up the code more with having more of it in the forms. I guess I should just leave well enough alone.
Thanks
Offline