Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-08-18 20:11:49
- Steve
- New Member
- Registered: 2008-05-19
- Posts: 7
How can I add non-repeating code above the news/blog section?
Let’s say I wanted to add a tiny description or image above where the news/blog entries appear, how would I go about doing this? I tried using the default form but it repeats everything I write above each entry. Any ideas?
Also, how can I add a banner (or text, or image — anything) above a particular number of posts? Like, imagine I want to add a tiny advertisement for Peta on the news section but only above the third entry. And even after more entries are posted, the ad would not move (kind of like my first question). Any suggestions, if that made any sense?
Offline
#2 2008-08-18 20:31:58
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: How can I add non-repeating code above the news/blog section?
For your first question, option #1 from this page will be interesting.
For the second one the offset attribute of both article tags (article/article_custom) will be useful.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#3 2008-08-18 23:11:01
- Steve
- New Member
- Registered: 2008-05-19
- Posts: 7
Re: How can I add non-repeating code above the news/blog section?
For my first question, no that isn’t all that interesting considering it doesn’t really get me anywhere. I need a static area ABOVE the non-static posts.
UPDATE: I figured out on my own how to achieve question one — I simply added the content to the page template and <i>not</i> the form. Still don’t know about the second.
Last edited by Steve (2008-08-18 23:21:11)
Offline
#4 2008-08-18 23:34:49
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: How can I add non-repeating code above the news/blog section?
Still don’t know about the second.
Try again and look for the line that says “Google ad” in the linked example.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: How can I add non-repeating code above the news/blog section?
Steve,
Uli’s link is what you needed for the second option.
In your case – a small advertisement above the 3rd entry:
<txp:article limit="3" pageby="10" />
<!-- google ad -->
<txp:article limit="7" offset="3" pageby="10" />
Last edited by renobird (2008-08-19 00:23:51)
Offline