Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-07-11 22:41:42
- PCM
- New Member
- Registered: 2005-12-13
- Posts: 6
How do I eliminate Sticky from search results page?
I have the sticky assigned to a section that places articles on the homepage. I also have news and events that dynamically show up underneath the sticky (hence the need for a sticky). I’ve been fussing with <txp:if_search> tags but can’t get anything to work. Any advice on how to eliminate the sticky from search results page?
Here’s my code for TXP:
<code>
<txp:if_article_list>
<txp:article form=“static” status=“sticky” sortby=“id” sortdir=“asc” />
<txp:article />
</txp:if_article_list>
<txp:if_individual_article>
<div class=“article_footer”>
Return to <a href=”—-”>Homepage</a> | <a href=”—-”>View all News & Events</a>
</div>
</txp:if_individual_article>
</code>
Thanks!
Offline
Re: How do I eliminate Sticky from search results page?
if_search should do it. You might be interested in glx plugins though (more powerful).
<pre>
<txp:if_article_list>
<txp:if_search>
<h2>search results</h2>
<txp:article limit="999" />
<txp:else />
<!—if not searching—>
<txp:article form="static" status="sticky" sortby="id" sortdir="asc" />
<txp:article />
</txp:if_search>
<txp:else />
<!— if individual article —>
<div class="article_footer">Return to <a href="—-">Homepage</a> | <a href="—-">View all News & Events</a></div>
</txp:if_article_list>
</pre>
Last edited by deldindesign (2006-07-12 00:58:53)
Offline
#3 2006-07-12 01:22:35
- PCM
- New Member
- Registered: 2005-12-13
- Posts: 6
Re: How do I eliminate Sticky from search results page?
Thanks!
Offline