Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-23 19:29:30

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

Search only lets you see last article posted

Hi

I thought this problem was to do with the RSS Live Search plug-in, but it would seem not.

I have put both the RSS search and the standard TP Search on my home page here http://www.toptentoptenlists.com

When you enter a search word into either, they both return the correct results. However, when you click on any of the results, even though the URL looks right you see the last article posted and not the article you expected.

Can anyone tell me what I might be doing wrong?

I use 4.04, my articles are all seperated into different Catagories, my home page uses the Default template, each catagory page uses a template called Article, I have no other plug-ins on the site.

Thanks

CC

Offline

#2 2006-11-23 19:44:39

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

Re: Search only lets you see last article posted

What code do you have on your ‘article’ page (article tag plus conditionals if any)?

Offline

#3 2006-11-23 19:48:31

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

Re: Search only lets you see last article posted

Here is the left column of the article page:

<div id=“leftcol”>

<!— google_ad_section_start —>

<img src=”<txp:site_url />images/<txp:category />.gif” alt=”<txp:category />” />

<txp:if_individual_article>

<txp:article_custom allowoverride=“0” form=“default-ad” limit=“1” pageby=“10” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:else />

<txp:article allowoverride=“0” form=“default-ad” limit=“1” pageby=“10” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article_custom allowoverride=“0” form=“Banner” limit=“1” pgonly=“0” section=“advert” status=“4” />

<txp:article allowoverride=“0” form=“default-ad” limit=“1” offset=“1” pageby=“10” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article allowoverride=“0” form=“default-ad” limit=“1” offset=“2” pageby=“10” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article allowoverride=“0” form=“default” limit=“2” offset=“3” pageby=“10” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article allowoverride=“0” form=“default” limit=“1” offset=“5” pageby=“10” searchsticky=“0” sort=“Posted desc” status=“4” />

<txp:article allowoverride=“0” form=“default” limit=“4” offset=“6” pageby=“10” searchsticky=“0” sort=“Posted desc” status=“4” />

</txp:if_individual_article>

<ul id=“tofro” >

<li><txp:newer><txp:text item=“newer” /></txp:newer></li>

<li><txp:older><txp:text item=“older” /></txp:older></li>

</ul>

<!— google_ad_section_end —>
</div>

Offline

#4 2006-11-23 19:51:32

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Search only lets you see last article posted

Is that for the article page template?

You need to specify what should happen on an article list and on a single article. Try this:

<txp:if_article_list>
<!--we are on the section front page, so site.com/article/-->
<txp:article limit="40" />
<txp:else />
<!--we are on an individual article-->
<txp:article />
</txp:if_article_list>

Edit: Too slow! if_individual_article’s else is the same as if_article_list.

Last edited by jm (2006-11-23 19:57:11)

Offline

#5 2006-11-23 19:58:20

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

Re: Search only lets you see last article posted

Change the first <txp:article_custom /> to <txp:article />.

Offline

#6 2006-11-23 20:07:12

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

Re: Search only lets you see last article posted

Els your a star, that’s the second (and probably not the last!) time you’ve bailed me out of the brown stuff on this site!

JM, should that code replace or be added to the code I have?

Offline

#7 2006-11-23 20:12:50

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Search only lets you see last article posted

Nope, it’s fixed, so don’t add it :). I posted that before I saw your template (wish punbb notified you of new posts while posting).

Offline

#8 2006-11-23 20:19:30

Charlie Chalk
Member
Registered: 2005-09-06
Posts: 51

Re: Search only lets you see last article posted

ok, thanks very much for taking the time to post though.

CC

Offline

Board footer

Powered by FluxBB