Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-10 16:39:02

qaisc
Member
Registered: 2008-06-10
Posts: 13

previous link not working

hello,
i installed text pattern and chose /section/title as my permanent link as opposed to messy titles. lets say my category is called life and i have quite a number of articles in life and when i do alisting of all my life articles with /?c=life i see the previous link on the bottom.

when i hover over it i get site_name/category/life/?pg=2

when i clik on i get a blank page. messy urls work fine when i switch to it. when i do diags, everything checks out for clean urls and clean urls also work fine every where else, but not on th previous button.

what am i doing wrong?

-qais

Offline

#2 2008-06-10 19:40:43

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: previous link not working

qaisc wrote:

when i do alisting of all my life articles with /?c=life i see the previous link on the bottom.

when i hover over it i get site_name/category/life/?pg=2

Does site_name/category/life display the first category page all right?

Offline

#3 2008-06-10 19:50:12

qaisc
Member
Registered: 2008-06-10
Posts: 13

Re: previous link not working

on my left_side menu i linked
<li><a href=”<txp:site_url />?c=life-2008”>life</a></li>

so when i click on it it displays the 5 articles because i have it limited to 5. then at the bottom i have the previous link.
the code for that is

<div id=“paging”><span id=“lefttext”><txp:older>&laquo; Previous Page</txp:older></span><span id=“righttext”><txp:newer>Next Page &raquo;</txp:newer></span></div>

so when i hover over the Previous link button, i see
<mysitename>/category/life/?pg=2

when i click on it, it displays an empty page.

mind you , all this works in messy urls, and it also works in clean urls but not for categories.

for example, i can click on my home button and it displays all the articles and on the bottom i see the previous button, when i hover over it i see
<mysitename>/?pg=2
at it doe stake me to page 2,

but it does not work with when i display articles for a particular category.

-qais

Offline

#4 2008-06-10 19:51:56

qaisc
Member
Registered: 2008-06-10
Posts: 13

Re: previous link not working

correction —-> the side menu has this

<li><a href=”<txp:site_url />?c=life”>life</a></li>

to get all the articles for category = life

Offline

#5 2008-06-10 20:07:02

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: previous link not working

qaisc wrote:

<li><a href="<txp:site_url />?c=life">life</a></li>

That’s messy ;) If you do it like this

<li><txp:category name="life" link="1" title="1" /></li>

or

<li><txp:category name="life" link="1">life</txp:category></li>

it will automatically output the right URL, depending on your permanent link mode. I’m not sure if this has anything to do with your problem, but you could see if it helps, and it is better anyway because if you ever decide to change your permanent link mode you don’t have to change your links manually.
(txp:category)

Offline

#6 2008-06-10 20:48:10

qaisc
Member
Registered: 2008-06-10
Posts: 13

Re: previous link not working

ok here is what i am seeing, i changed the code and inserted this
<pre>
<li><txp:category name=“life-2008” link=“1” section=“articles” >life 2008</txp:category></li>
<li><txp:category name=“theories” link=“1” title=“1” /></li>
</pre>

the first line gives me the link site_url/articles/?c=life-2008
the second and third line take me to site_url/category/?=theories

both give me black pages with just one line in bold on top life 2008 Category and theories Category.

you can check it on qaischaudry.com

it’s rather strange because the home link works fine with previous and next links. but it does not work with categories, but now i can’t display the categories also.

-qais

Offline

#7 2008-06-10 21:17:39

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: previous link not working

qaisc wrote:

the first line gives me the link site_url/articles/?c=life-2008
the second and third line take me to site_url/category/?=theories

The second (and third) url is site_url/category/theories/.

You’ll just need the proper article tags on your pages. The first link goes to your ‘articles’ section page. The others go to the front page (if not specified otherwise category lists use the front page). You need at least a <txp:article /> tag on the page you want to use for your category lists (either front page or section page) to display the right articles.

Edit: it looks like your site is using both clean and messy URLs: article permlinks are clean (and working), links to category pages (‘Filed under’) are messy… Did you hand code any of the links?

Hmm… both http://qaischaudry.com/index.php?s=articles&c=life-2008 and http://qaischaudry.com/index.php?c=life-2008 work… so you do have the right article tags on your page(s).
Pagination also works in messy mode: http://qaischaudry.com/index.php?pg=2&c=life-2008.

I don’t understand why only article permlinks would work in clean URL mode and nothing else, haven’t seen this before.

Last edited by els (2008-06-10 21:37:04)

Offline

#8 2008-06-10 22:03:37

qaisc
Member
Registered: 2008-06-10
Posts: 13

Re: previous link not working

thank you for the help, you got me on the right track. on my page that was calling the side_bar form, i stuck this

<txp:if_category name=“life-2008”>
<p class=“categorytitle”><txp:category title=“1” /> as i lived it in utter missery and dispair</p>
<txp:recent_articles limit=“999” break=“br” wraptag=“p” class=“list” category=“life-2008”/>
</txp:if_category>

i did this for all my categories and it does want i want to.

what i don’t understand is that when i use messy urls, it displays the articles without me doing this, so why is it that when i use txp:category , it does not list the articles?

Offline

Board footer

Powered by FluxBB