Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-11 12:57:06

hilary
Member
Registered: 2006-09-11
Posts: 37

Sticky shows on search results: making it pull from custom page

Hi there,
I have the latest version of Textpattern, I used this code

<txp:article  form="default" status="sticky" /> <!-- HERE -->
<txp:article  form="default" status="live" />

In my default page to make sticky articles work, this works great, until a search is done, and on the search results page every sticky article is displayed before the results..

I have created a new page template, without the sticky code, and a new section that uses that page, now how do I make the search results use this section/page, instead of the default one it is pulling from please!! Im using the livesearch plugin also if this makes a difference!

Many thanks for your time!

Hilary

(Edit: updated to display code properly. -Mary)

Last edited by Mary (2006-09-11 16:37:52)

Offline

#2 2006-09-11 21:08:35

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

Re: Sticky shows on search results: making it pull from custom page

hilary wrote:

I have created a new page template, without the sticky code, and a new section that uses that page, now how do I make the search results use this section/page, instead of the default one it is pulling from please!!

If you do this you don’t need a new section:

<txp:if_search>
<txp:else />
<txp:article  form="default" status="sticky" />
</txp:if_search>
<txp:article  form="default" status="live" />

Offline

#3 2006-09-12 08:39:56

hilary
Member
Registered: 2006-09-11
Posts: 37

Re: Sticky shows on search results: making it pull from custom page

Els I could hug you!!! THANK YOU!! That just worked perfectly!

Offline

Board footer

Powered by FluxBB