Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-10-10 13:48:09

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: list of article, pagination, different frontpage

jsoo wrote:

If I am following this correctly on my tiny screen, there wasn’t a problem with soo_if_frontpage, but simply a conditional logic problem: not enough “else” blocks. Another reason to try the simplification I suggested (with Els’s addition).

actually it was a problem with soo_if_frontpage as well until i added pg=“1” (uli’s suggestion).
secondly, jeff, your simplification not working. only frontpage displayed properly (3 first articles with excerpt+7 article titles) , second page displayed 10 articles with excerpts (but needed 10 article titles).

then i tried to remove <txp:if_section> (added name=“artiklid” to <txp:soo_if_frontpage pg=“1”>) conditionals and then <txp:if_article_list> to make code shorter, but both affected badly my other sections.

right now i left this code below, which works like i ment

<txp:if_section name="artiklid">
<txp:if_article_list>
<txp:soo_if_frontpage pg="1">
<txp:article limit="3" pageby="10" />
<ul class="pealkirjad"><txp:article form="article_b" offset="3" pageby="10" limit="7" /></ul>
<txp:newer>Newer</txp:newer><txp:older>Older</txp:older>
<txp:else />
<ul class="pealkirjad"><txp:article form="article_b" offset="0" pageby="10" limit="10" /></ul>
<txp:newer>Newer</txp:newer><txp:older>Older</txp:older>
</txp:soo_if_frontpage>
<txp:else />
<txp:article />
</txp:if_article_list>
</txp:if_section>

Offline

#14 2009-10-10 18:31:32

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: list of article, pagination, different frontpage

OK, sorry for misunderstanding (again, tiny Internet device not conducive to code evaluation). Glad you have it working. You should be able to slim it a little, by eliminating the if_section tags and adding the section attribute to soo_if_frontpage (keeping the if_article_list block as the outer block).

I wouldn’t say you had a “problem” with soo_if_frontpage, in the sense of a bug. Again, glad it’s working.


Code is topiary

Offline

#15 2009-10-10 23:26:41

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: list of article, pagination, different frontpage

jsoo wrote:

I wouldn’t say you had a “problem” with soo_if_frontpage, in the sense of a bug.

Jeff, I was the first one in this thread to put the words “problem” and “if_frontpage” in one sentence, so I feel the need to answer. Apparently my words can have a second meaning. I actually wanted to express that there’s a problem in the way the if_frontpage tag is applied. Sorry if you felt bad, was not my intention.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#16 2009-10-11 11:40:43

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: list of article, pagination, different frontpage

jsoo wrote:

OK, sorry for misunderstanding (again, tiny Internet device not conducive to code evaluation). Glad you have it working. You should be able to slim it a little, by eliminating the if_section tags and adding the section attribute to soo_if_frontpage (keeping the if_article_list block as the outer block).

i tried, but it affected badly my other sections

Offline

#17 2009-10-11 12:44:11

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: list of article, pagination, different frontpage

…and get it properly work with ob1_pagination as well. thank you uli, els, jsoo

working code:

<txp:if_section name="artiklid">
<txp:if_article_list>
<txp:soo_if_frontpage pg="1">
<txp:article limit="3" pageby="10" />
<ul class="pealkirjad"><txp:article form="article_b" offset="3" pageby="10" limit="7" /></ul>
<txp:ob1_pagination previoustext="Uuemad" nexttext="Vanemad" ulclass="pagination" liselected="active" />
<txp:else />
<ul class="pealkirjad"><txp:article form="article_b" offset="0" pageby="10" limit="10" /></ul>
<txp:ob1_pagination previoustext="Uuemad" nexttext="Vanemad" ulclass="pagination" liselected="active" />
</txp:soo_if_frontpage>
<txp:else />
<txp:article />
</txp:if_article_list>
</txp:if_section>

Offline

Board footer

Powered by FluxBB