Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
older and newer don't show the link
I just can’t make it work, this is what I have. I put a limit of 3 and i have 6 posts and i can’t see the links of newer or older.
<txp:if_search>
<h6>Resultados:</h6>
<txp:article form="blog" limit="5" />
</txp:if_search>
<txp:if_article_list>
<txp:article form="blog" limit="3" />
<div class="pagination">
<txp:older>anterior</txp:older>
<txp:newer>siguiente</txp:newer>
</div>
</txp:if_article_list>
<txp:if_individual_article>
<txp:article form="blog" limit="5" />
</txp:if_individual_article>
Thanks,
Seb
Sonríe | Smile . <txp:lover />
Offline
Offline
Re: older and newer don't show the link
<!-- Runtime: 0,0612 -->
<!-- Query time: 0,020046 -->
<!-- Queries: 28 -->
<!-- Memory: 5983Kb, <txp:comments_count /> -->
<!-- txp tag trace:
[SQL (0,0101850032806): select name, data from txp_lang where lang='es-es' AND ( event='public' OR event='common')]
[SQL (0,00215697288513): select name, code, version from txp_plugin where status = 1 AND type IN (0,1) order by load_order]
[SQL (0,000422954559326): select title from txp_section where name='']
[SQL (0,000197172164917): select page, css from txp_section where name = 'default' limit 1]
[SQL (0,00025486946106): select host from txp_log where ip='127.0.0.1' limit 1]
[SQL (0,000181913375854): insert into txp_log set `time`=now(),page='/',ip='127.0.0.1',host='practivate.adobe.com',refer='',status='200',method='GET']
[SQL (0,000138998031616): select user_html from txp_page where name='default']
[Página: default]
<txp:output_form form="head" />
[SQL (0,00015115737915): select Form from txp_form where name='head']
[Bloque: head]
<txp:output_form form="meta" />
[SQL (0,000148057937622): select Form from txp_form where name='meta']
[Bloque: meta]
<txp:rah_metas keywords='<txp:article><txp:keywords /><txp:if_last_article><txp:else />,</txp:if_last_article></txp:article>' />
[attribute 'keywords']
<txp:article>
[SQL (0,000247001647949): select name from txp_section where on_frontpage != '1']
[SQL (0,00045108795166): select count(*) from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section != 'ministerio' and Section != 'contacta' and Section != 'archivo' and Section != 'search']
[SQL (0,000741004943848): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section != 'ministerio' and Section != 'contacta' and Section != 'archivo' and Section != 'search' order by Posted desc limit 0, 10]
[artículo 11]
<txp:keywords />
<txp:if_last_article>
[<txp:if_last_article>: false]
</txp:if_last_article>
[artículo 10]
<txp:keywords />
<txp:if_last_article>
[<txp:if_last_article>: false]
</txp:if_last_article>
[artículo 7]
<txp:keywords />
<txp:if_last_article>
[<txp:if_last_article>: false]
</txp:if_last_article>
[artículo 5]
<txp:keywords />
<txp:if_last_article>
[<txp:if_last_article>: false]
</txp:if_last_article>
[artículo 4]
<txp:keywords />
<txp:if_last_article>
[<txp:if_last_article>: false]
</txp:if_last_article>
[artículo 3]
<txp:keywords />
<txp:if_last_article>
[<txp:if_last_article>: false]
</txp:if_last_article>
[artículo 2]
<txp:keywords />
<txp:if_last_article>
[<txp:if_last_article>: true]
</txp:if_last_article>
</txp:article>
[/attribute]
<txp:rvm_css format="link" n="reset" />
<txp:rvm_css format="link" n="main" />
<txp:rvm_css format="link" n="jquery.fancybox-1.3.1" />
<txp:output_form form="leftside" />
[SQL (0,000257968902588): select Form from txp_form where name='leftside']
[Bloque: leftside]
<txp:category link="1" title="1" name="mensaje" />
[SQL (0,000180006027222): select title from txp_category where name='mensaje' and type='article']
<txp:category link="1" title="1" name="audio" />
[SQL (0,000149965286255): select title from txp_category where name='audio' and type='article']
<txp:category link="1" title="1" name="noticia" />
[SQL (0,00015115737915): select title from txp_category where name='noticia' and type='article']
<txp:category link="1" title="1" name="cita" />
[SQL (0,000140905380249): select title from txp_category where name='cita' and type='article']
<txp:category link="1" title="1" name="fotos" />
[SQL (0,000138998031616): select title from txp_category where name='fotos' and type='article']
<txp:category link="1" title="1" name="video" />
[SQL (0,000148057937622): select title from txp_category where name='video' and type='article']
<txp:section link="1" title="1" name="archivo"/>
[SQL (0,0001220703125): select title from txp_section where name='archivo']
<txp:if_section name="">
[<txp:if_section name="">: true]
</txp:if_section>
<txp:link_to_home>
</txp:link_to_home>
<txp:if_section name="ministerio">
[<txp:if_section name="ministerio">: false]
</txp:if_section>
<txp:section link="1" title="1" name="ministerio" />
[SQL (0,000119209289551): select title from txp_section where name='ministerio']
<txp:if_section name="contacta">
[<txp:if_section name="contacta">: false]
</txp:if_section>
<txp:section link="1" title="1" name="contacta" />
[SQL (0,000143051147461): select title from txp_section where name='contacta']
<txp:if_search>
[<txp:if_search>: false]
</txp:if_search>
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:article form="blog" limit="3" />
[SQL (0,000789165496826): select count(*) from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section != 'ministerio' and Section != 'contacta' and Section != 'archivo' and Section != 'search']
[SQL (0,000869989395142): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section != 'ministerio' and Section != 'contacta' and Section != 'archivo' and Section != 'search' order by Posted desc limit 0, 3]
[artículo 11]
[SQL (0,000225067138672): select Form from txp_form where name='blog']
[Bloque: blog]
<txp:if_article_category name="mensaje" number="1">
[<txp:if_article_category name="mensaje" number="1">: false]
<txp:if_article_category name="noticia" number="1">
[<txp:if_article_category name="noticia" number="1">: false]
<txp:if_article_category name="cita" number="1">
[<txp:if_article_category name="cita" number="1">: false]
<txp:if_article_category name="fotos" number="1">
[<txp:if_article_category name="fotos" number="1">: false]
<txp:if_article_category name="audio" number="1">
[<txp:if_article_category name="audio" number="1">: false]
<txp:if_article_category name="video" number="1">
[<txp:if_article_category name="video" number="1">: true]
<txp:permlink>
<txp:title />
</txp:permlink>
<txp:posted />
<txp:body />
<txp:if_comments>
[<txp:if_comments>: true]
<txp:permlink>
<txp:comments_count />
</txp:permlink>
</txp:if_comments>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
[artículo 10]
[Bloque: blog]
<txp:if_article_category name="mensaje" number="1">
[<txp:if_article_category name="mensaje" number="1">: false]
<txp:if_article_category name="noticia" number="1">
[<txp:if_article_category name="noticia" number="1">: false]
<txp:if_article_category name="cita" number="1">
[<txp:if_article_category name="cita" number="1">: false]
<txp:if_article_category name="fotos" number="1">
[<txp:if_article_category name="fotos" number="1">: true]
<txp:permlink>
<txp:title />
</txp:permlink>
<txp:posted />
<txp:body />
<txp:image id="5" class="class" />
[SQL (0,000305891036987): select * from txp_image where id = 5 limit 1]
<txp:if_comments>
[<txp:if_comments>: false]
<txp:permlink>
<txp:comments_count />
</txp:permlink>
</txp:if_comments>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
[artículo 7]
[Bloque: blog]
<txp:if_article_category name="mensaje" number="1">
[<txp:if_article_category name="mensaje" number="1">: false]
<txp:if_article_category name="noticia" number="1">
[<txp:if_article_category name="noticia" number="1">: false]
<txp:if_article_category name="cita" number="1">
[<txp:if_article_category name="cita" number="1">: false]
<txp:if_article_category name="fotos" number="1">
[<txp:if_article_category name="fotos" number="1">: false]
<txp:if_article_category name="audio" number="1">
[<txp:if_article_category name="audio" number="1">: true]
<txp:permlink>
<txp:title />
</txp:permlink>
<txp:posted />
<txp:body />
<txp:jnm_audio url="http://ministeriovcn.dev/audio/09-11-22-escuchar-a-dios.mp3">
</txp:jnm_audio>
<txp:if_comments>
[<txp:if_comments>: false]
<txp:permlink>
<txp:comments_count />
</txp:permlink>
</txp:if_comments>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
<txp:older>
</txp:older>
<txp:newer>
</txp:newer>
</txp:if_article_list>
<txp:if_individual_article>
[<txp:if_individual_article>: false]
</txp:if_individual_article>
<txp:output_form form="footer" />
[SQL (0,000277042388916): select Form from txp_form where name='footer']
[Bloque: footer]
[ ~~~ secondpass ~~~ ]
-->
Here’s the tag trace
Thank you
(changed bq.
into bc.
-Els)
Last edited by els (2010-05-07 16:19:49)
Sonríe | Smile . <txp:lover />
Offline
#4 2010-05-07 16:28:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: older and newer don't show the link
Is it possible that the other three articles don’t have one of those six categories (mensaje, noticia, cita, fotos, audio, video) as their category 1?
Offline
Re: older and newer don't show the link
All this categories are in “category 1”.
Sonríe | Smile . <txp:lover />
Offline
#6 2010-05-07 19:59:29
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: older and newer don't show the link
Do all six articles show up if you change limit
to 6
? Are the other articles in a section that is set to be displayed on the front page?
Offline
Re: older and newer don't show the link
Any number that it i put for the limit will show the articles but don’t show the newer or older link. Each articles is named with a category in the same section. So there isn’t articles named without another category because each article is with their particular category. I don’t know where is the problem, i’ll put the page and form how i have.
Pages Default
<txp:if_search>
<h6>Your Search Results:</h6>
<txp:article form="blog" limit="6" />
</txp:if_search>
txp:if_article_list>
<txp:article form="blog" limit="6" />
<divv class="pagination ">
<div class="previous"><h3><txp:older>← anterior</txp:older></h3></div>
<div class="next"><h3><txp:newer>siguiente →</txp:newer></h3></div>
</div>
</txp:if_article_list>
<txp:if_individual_article>
<txp:article form="blog" />
</txp:if_individual_article>
Form Blog
<txp:if_article_category name="mensaje" number="1">
<div class="entry mensaje clearfix">
<div class="cat-icon"><p title="mensaje">mensaje</p></div>
<h2 class="title"><txp:permlink><txp:title /></txp:permlink></h2>
<div class="date"><h3><txp:posted /></h3></div><!-- .art date -->
<txp:if_individual_article>
<txp:body />
<txp:else />
<txp:rss_auto_excerpt linktext="Leer todo…" linkclass="morelink" paragraphs="3" wrapreadmore="1" showlinkwithbody="0" />
</txp:if_individual_article>
<div class="count-comments">
<h3>
<txp:if_comments>
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
<txp:else />
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
</txp:if_comments>
</h3>
</div><!-- .count comments -->
</div><!-- .entry -->
<txp:else /><!-- **MENSAJE** -->
<txp:if_article_category name="noticia" number="1">
<div class="entry noticia clearfix">
<div class="cat-icon"><p title="noticia">noticia</p></div>
<h2 class="title"><txp:permlink><txp:title /></txp:permlink></h2>
<div class="date"><h3><txp:posted /></h3></div><!-- .art date -->
<txp:if_individual_article>
<txp:body />
<txp:else />
<txp:rss_auto_excerpt linktext="Leer todo…" linkclass="morelink" paragraphs="3" wrapreadmore="1" showlinkwithbody="0" />
</txp:if_individual_article>
<div class="count-comments">
<h3>
<txp:if_comments>
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
<txp:else />
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
</txp:if_comments>
</h3>
</div><!-- .count comments -->
</div><!-- .entry -->
<txp:else /><!-- **NOTICIA** -->
<txp:if_article_category name="cita" number="1">
<div class="entry cita clearfix">
<div class="cat-icon"><p title="cita">cita</p></div>
<h2 class="title">Sabiduría #<txp:title /></h2>
<div class="date"><h3><txp:posted /></h3></div><!-- .art date -->
<txp:body />
</div><!-- .entry -->
<txp:else /><!-- **CITA** -->
<txp:if_article_category name="fotos" number="1">
<div class="entry fotos clearfix">
<div class="cat-icon"><p title="fotos">fotos</p></div>
<h2 class="title"><txp:permlink><txp:title /></txp:permlink></h2>
<div class="date"><h3><txp:posted /></h3></div><!-- .art date -->
<txp:body />
<div class="count-comments">
<h3>
<txp:if_comments>
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
<txp:else />
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
</txp:if_comments>
</h3>
</div><!-- .count comments -->
</div><!-- .entry -->
<txp:else /><!-- **FOTOS** -->
<txp:if_article_category name="audio" number="1">
<div class="entry audio clearfix">
<div class="cat-icon"><p title="audio">audio</p></div>
<h2 class="title"><txp:permlink><txp:title /></txp:permlink></h2>
<div class="date"><h3><txp:posted /></h3></div><!-- .art date -->
<txp:body />
<div class="count-comments">
<h3>
<txp:if_comments>
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
<txp:else />
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
</txp:if_comments>
</h3>
</div><!-- .count comments -->
</div><!-- .entry -->
<txp:else /><!-- **AUDIO** -->
<txp:if_article_category name="video" number="1">
<div class="entry video clearfix">
<div class="cat-icon"><p title="video">video</p></div>
<h2 class="title"><txp:permlink><txp:title /></txp:permlink></h2>
<div class="date"><h3><txp:posted /></h3></div><!-- .art date -->
<txp:body />
<div class="count-comments">
<h3>
<txp:if_comments>
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
<txp:else />
<txp:permlink>
<txp:comments_count /> Comentarios
</txp:permlink>
</txp:if_comments>
</h3>
</div><!-- .count comments -->
</div><!-- .entry -->
<txp:else /><!-- **VIDEO** -->
<div class="cat-icon">varios<div class="cat-icon">
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
</txp:if_article_category>
Sonríe | Smile . <txp:lover />
Offline
Re: older and newer don't show the link
Could be the problem the categories that i’m using on the form ‘blog’?
Sonríe | Smile . <txp:lover />
Offline
#9 2010-05-11 18:35:57
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: older and newer don't show the link
I don’t think so. At the moment I don’t see anything in your code that could cause the problem. So even if you set limit to ‘1’ you don’t get the links?
Do you have a link to the page in question? It might become clearer if I could see it in action (in ‘debug’ mode).
Last edited by els (2010-05-11 18:36:50)
Offline
Re: older and newer don't show the link
I have created a div called ‘pagination’ with the newer and older tags inside but in the source code is empty the pagination div.
This is the link (the website isn’t finished)
Sonríe | Smile . <txp:lover />
Offline
#11 2010-05-11 19:23:33
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: older and newer don't show the link
Hi, you have set limit="5"
and there are only 4 articles showing (nrs 5, 4, 3 and 2). If there are only 4 articles there wouldn’t be older and newer links. Does it show more articles if you change the limit to 99? If not, you should doublecheck the missing articles (are they ‘live’? do section and category match? etc.)
Offline
Re: older and newer don't show the link
Ok, the limit is 5 but i have a total of 10 articles (content > articles), is showing the limit that it put. All the articles are ‘live’ and the categories are ok, there is not a problem, if i put limit="99"
i’ll see all the articles, if i put any number i’ll see the number that i put, but never show the older or newer.
Last edited by sebatorresi (2010-05-11 22:12:22)
Sonríe | Smile . <txp:lover />
Offline