Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-06-30 14:42:33
- mttw
- Member
- From: The Netherlands
- Registered: 2005-03-12
- Posts: 26
2 column problem
I have 2 columns on the frontpage of my website. There is one section called articles and two categories calles box1 and box2. Now I want to write articles and place them into section articles, category box1 or box2.
@<div class=“span-7 colborder”> <h6>Box1</h6> <txp:article form=“box1” pgonly=“0” /> </div>
<div class=“span-8 colborder”> <h6>Box2</h6> <txp:article form=“box2” pgonly=“0” />@
When I want to read the full article ie. the article in box1 I’m facing a problem…. box1 is now showing the full article but box2 is becoming empty. I think this is because you’re directed to a new url. Is there a way to update only the column with box1 inside and leaving box2 as it is?
Offline
Re: 2 column problem
txp:article_custom
txp:article
As article_custom
isn’t context sensitive, we got:
<div class="span-7 colborder">
<h6>Box1</h6>
<txp:article form="box1" />
</div>
<div class="span-8 colborder">
<h6>Box2</h6>
<txp:article_custom section="articles" form="box2" />
</div>
Last edited by Gocom (2008-06-30 16:06:37)
Offline
#3 2008-06-30 18:37:05
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: 2 column problem
If your full article uses another form you’d need a conditional as well:
<div class="span-7 colborder">
<h6>Box1</h6>
<txp:if_individual_article>
<txp:article form="your_single_article_form" />
<txp:else />
<txp:article_custom section="articles" category="box1" form="box1" />
<txp:if_individual_article>
</div>
<div class="span-8 colborder">
<h6>Box2</h6>
<txp:article_custom section="articles" category="box2" form="box2" />
</div>
Do you only want this behaviour for box1 or also the other way around?
Last edited by els (2008-06-30 18:38:04)
Offline
#4 2008-07-01 09:49:07
- mttw
- Member
- From: The Netherlands
- Registered: 2005-03-12
- Posts: 26
Re: 2 column problem
I think I’m getting somewhere now. It’s still a bit of playing with sections and categories. Thank you for so far…..
Offline
Pages: 1