Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
articles layout
Is there a way to layout different articles from the same category into two columns (two divs) on the page?
Content of every article is one photograph and text link.
Any solution is very welcome:)
Thank you!
Offline
#2 2006-06-08 21:29:41
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: articles layout
Do you mean you want to split each article in two columns, or display the list of articles in a category in two columns?
Offline
Re: articles layout
Els wrote:
Do you mean you want to split each article in two columns, or display the list of articles in a category in two columns?
No, actually I want to present 4 articles in two columns (2 articles per column), so when user publishes new article, old articles move one place down the column.
Hope you understand now:)
Offline
#4 2006-06-09 16:54:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: articles layout
Yes I understand. I think you want to do something like I do on my category pages, like this one, right? Here is my code (page):
<code>
<txp:if_category name=“clickertraining,gedrag,over-boeken,bloggiez”>
<div class=“frontcol1”>
<txp:article form=“article_col2” listform=“article_col2” limit=“10” offset=“10” pageby=“20” />
</div>
<div class=“frontcol2”>
<txp:article form=“article_col2” listform=“article_col2” limit=“10” pageby=“20” />
</div>
<br style=“clear:both;” />
<div class=“center”><txp:rsx_page_number_list delim=”“ /></div>
</txp:if_category>
</code>
CSS:
<code>#content .frontcol1 {
width: 264px;
margin-right: 2px;
float: right;
margin-top: 1px;
}</code>
<code>#content .frontcol2 {
margin-top: 1px;
margin-right: 284px;
}</code>
Offline
Re: articles layout
Yes, exactly!!! Thank you very much!
Offline
Pages: 1