Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-11-12 15:12:10
- ductions
- New Member
- Registered: 2006-11-12
- Posts: 2
Front page articles, different class.
Sorry if this has been posted before I wasn’t sure what to search for.
I’ve just started setting up my site with textpattern, and its easier than imagined it to be.
On the front page I will have 3 articles, the first (at the top) will be larger than the 2 below. How can I accomplish this in Textpattern?
To see what I mean go to my site.
I suspect it will be a case of changing the class of the div wrapped around the 2nd and 3rd articles but i have no idea how to do this with textpattern
Last edited by ductions (2006-11-12 15:14:17)
Offline
Re: Front page articles, different class.
You will need a means of separating the first from the second/third article. This can be achieved in various ways:
- txp:article supports three attributes,
offset
,pageby
andlimit
which help to render multi part article lists. A example can be found in the corresponding Textbook page (Example 3). - A conditional tag is an alternative way: txp:if_first_article.
As soon as you got the two parts separated, you can pass different form
values into txp:article
which will in turn contain the markup you wanted to use for the first and all subsequent articles (varying classes…).
Offline
#3 2006-11-12 18:30:15
- ductions
- New Member
- Registered: 2006-11-12
- Posts: 2
Re: Front page articles, different class.
Thanks for that, I used your first suggestion and it worked great!
Offline