Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-07-27 17:23:11
- jimpoep
- Member
- Registered: 2006-02-19
- Posts: 33
1st post other css
I’m not sure how to ask this question, but I want to give the 1st/top post an other css code/id/class. I can change it when I added a new post, but I do’nt want that. Any sugestions?
Regards.
<Sorry for my bad English>
Offline
Re: 1st post other css
Display two lists. First a list of one, then a list of 4 (or whatever).
http://textpattern.net/wiki/index.php?title=Txp:article_/ – check pageby and offset.
You can then either use a different form-name in the article-tag, or you can wrap the first list with another element and use that for styling.
Offline
#3 2006-07-27 17:41:47
- NyteOwl
- Member

- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Re: 1st post other css
I do this on one of my sites.
My main page has this code:
<code>
<txp:if_article_list>
<txp:article form=“currentarticle” limit=“1” />
<br />
<txp:article offset=“1” form=“excerpt-data” limit=“4” sortby=“Posted” sortdir=“desc” excerpted=“y” />
</txp:if_article_list>
</code>
<br />The key here is the currentarticle form:
<code>
<div id=“currart”>
<h2><txp:title /></h2>
<txp:body />
<div class=“articledata”>
<span class=“posted”><txp:posted /></span><br />
<txp:permlink>Full Article</txp:permlink>
<txp:if_comments_allowed> | <txp:comments_invite /></txp:if_comments_allowed>
</div>
</div>
</code>
<br />In my stylesheet I set the CSS specification for currart to the styling I want the first article on the page to have. You can see this in use at <a href=“http://www.ve1cbf.ca” title=“VE1CBF The Yak Shack”>The Yak Shack</a>.
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
#4 2006-07-27 17:54:50
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: 1st post other css
You can also do this with just one form, with txp:if_first_article.
Offline
#5 2006-07-27 20:37:32
- jimpoep
- Member
- Registered: 2006-02-19
- Posts: 33
Re: 1st post other css
Offline
#6 2006-07-28 01:02:51
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline
Pages: 1