Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-10-08 13:48:50
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
list of article, pagination, different frontpage
i have a long list of articles where the first three articles is displayed differently. using ob1_pagination and soo_if_frontpage i’d like to use pagination in my list : first 3 articles with excerpt + 7 next article titles in frontpage and 10 article titles in next pages. something similar like here + pagination. but can’t get it to work propely
page:
<txp:if_section name="artiklid">
<txp:if_article_list>
<txp:soo_if_frontpage>
<txp:article limit="3" />
<ul class="pealkirjad"><txp:article form="article_b" offset="3" limit="7" /></ul>
<txp:ob1_pagination previoustext="Eelmine" nexttext="Järgmine" ulclass="pagination" liselected="active" />
<txp:else />
<ul class="pealkirjad"><txp:article form="article_b" offset="0" limit="10" /></ul>
<txp:ob1_pagination previoustext="Eelmine" nexttext="Järgmine" ulclass="pagination" liselected="active" />
</txp:soo_if_frontpage>
</txp:if_article_list>
</txp:if_section>
article_b form:
<li><txp:permlink><txp:title /></txp:permlink></li>
Offline
#2 2009-10-08 21:32:36
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: list of article, pagination, different frontpage
I’m not sure how ob1_pagination works, but using the regular pagination (older/newer) you’d need to use pageby="10"
in both the article tags for the front page.
Offline
#3 2009-10-09 09:57:14
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: list of article, pagination, different frontpage
Els wrote:
I’m not sure how ob1_pagination works, but using the regular pagination (older/newer) you’d need to use
pageby="10"
in both the article tags for the front page.
like this?
<txp:if_section name="artiklid">
<txp:if_article_list>
<txp:soo_if_frontpage>
<txp:article limit="3" />
<ul class="pealkirjad"><txp:article form="article_b" offset="3" pageby="10" /></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" /></ul>
<txp:newer>Newer</txp:newer><txp:older>Older</txp:older>
</txp:soo_if_frontpage>
</txp:if_article_list>
</txp:if_section>
no difference. the first 3 differently styled (title+excerpt) articles stay at the top of each page till to the end of list. i’m using this <txp:soo_if_frontpage> plugin uncorrectly…mhh
Offline
#4 2009-10-09 10:33:43
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: list of article, pagination, different frontpage
You deleted limit="7"
/ limit="10"
. What happens when you enter these again?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#5 2009-10-09 10:45:38
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: list of article, pagination, different frontpage
uli wrote:
You deleted
limit="7"
/limit="10"
. What happens when you enter these again?
no help. take a look
Offline
#6 2009-10-09 11:09:05
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: list of article, pagination, different frontpage
Gallex wrote:
no help.
It didn’t cure all the problems, but it changed the behavior essentially: Now we have pages! Thus I presume it really might be a problem with the if_frontpage tag.
Though I doubt it will help: have you tried the pg attribute?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#7 2009-10-09 11:57:26
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: list of article, pagination, different frontpage
uli wrote:
It didn’t cure all the problems, but it changed the behavior essentially: Now we have pages!
actually the pages had before as well – i changed back to old solution when i saw it didn’t work
Thus I presume it really might be a problem with the if_frontpage tag.
Though I doubt it will help: have you tried the pg attribute?
…but it did help :) thank’s.
surprisingly i discovered i has lost individual pages now.
working page:
<txp:if_section name="artiklid">
<txp:if_article_list>
<txp:soo_if_frontpage pg="1">
<txp:article limit="3" />
<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:if_article_list>
</txp:if_section>
article form (not working with page above):
<div class="article">
<txp:if_article_list>
<txp:if_excerpt>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<txp:excerpt />
<p class="meta"><txp:permlink>Loe edasi</txp:permlink></p>
<txp:else />
<h3><txp:title /></h3>
<txp:body />
</txp:if_excerpt>
<txp:else />
<h3><txp:title /></h3>
<txp:body />
</txp:if_article_list>
</div>
Last edited by Gallex (2009-10-09 12:19:17)
Offline
#8 2009-10-09 13:19:09
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: list of article, pagination, different frontpage
added this 2 lines before the end of a code and get it work
...</txp:soo_if_frontpage>
<txp:else />
<txp:article />
</txp:if_article_list>
</txp:if_section>
now i’ll try again with ob1_pagination
Offline
Re: list of article, pagination, different frontpage
<txp:soo_if_frontpage pg="1" section="artiklid">
<txp:article limit="3" />
<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 />
<txp:article />
</txp:soo_if_frontpage>
Hard for me to follow this on my iPod ;) Note the above simplification.
Code is topiary
Offline
#10 2009-10-09 16:37:16
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: list of article, pagination, different frontpage
You need the pageby
attribute in both frontpage article tags:
<txp:article limit="3" pageby="10" />
<ul class="pealkirjad"><txp:article form="article_b" offset="3" pageby="10" limit="7" /></ul>
Last edited by els (2009-10-09 16:38:30)
Offline
#11 2009-10-09 18:37:31
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: list of article, pagination, different frontpage
Gallex wrote
actually the pages had before as well – i changed back to old solution when i saw it didn’t work
Gallex, that’s good to know! And I don’t mean that ironic!
That’s important information for us in order to diagnose your problem. Not until knowing that paging worked I could locate the problem coming from the if:frontpage tag. Please try to see it a little more from our perspective. Statements like can’t get it to work propely
don’t give us a clue what’s wrong with your site.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: list of article, pagination, different frontpage
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).
Code is topiary
Offline