Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Search Page
I tried that code snippet, seems you can’t nest it, it doesn’t show the HR, I’m curious though, say for instance you created an article in two diff sections and then added one to the first, would it show it by section or show the first two sections and then repeat the first with the latest article?
EDIT: Just double checked, basically it’s showing the articles in hierarchical order of date, and section second, so if i get a article newer than all others, it posts the section twice, how do i stop this? PLEASE
Last edited by driz (2008-09-15 18:56:16)
~ Cameron
Offline
Offline
Re: Search Page
Gocom wrote:
See
sort
attribute and it’s values.
So we get sort="Section asc"
that should be placed to your <txp:article />
-tag.
That works quite nice :) Thanks. x
~ Cameron
Offline
Re: Search Page
How do I get it so say they search for something, and they have no results, and I want to put something saying this. I’ve tried adding a txp else tag to the search_results form, but no luck :S
~ Cameron
Offline
Re: Search Page
Hint: there are several other search related tags (see Textbook)
Offline
#18 2008-09-15 22:10:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Search Page
Offline
Re: Search Page
These are only ones i see :S
<txp:search_input />
<txp:search_result_count />
<txp:search_result_date />
<txp:search_result_excerpt />
<txp:search_result_title />
<txp:search_result_url />
<txp:search_term />
~ Cameron
Offline
Offline
Offline
Re: Search Page
Okies, I have this so far, but even WHEN they have a legitimate search it’s still saying Sorry…
<txp:if_search>
<p style="font-size:2.5em;">You searched for: <txp:page_url type="q" /></p>
<txp:else />
<p>begin searching by typing in the search box in the top right corner</p>
</txp:if_search>
</div>
<div id="body">
<div id="maincontent" style="width:980px;">
<div class="innerBlocks">
<txp:if_search_results>
<p>These articles match your search request: </p>
<txp:else />
<p>Sorry, we were not able to find a page matching your search request <strong><txp:search_term /></strong>.</p>
</txp:if_search_results>
<txp:if_search>
<txp:article form="search_results" sort="Section asc" />
<txp:else />
<p>No Content Available...</p>
</txp:if_search>
~ Cameron
Offline
#23 2008-09-15 22:20:33
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Search Page
Honestly, do you ever take some time to read?
Edit: sorry, spoke too soon :(
I think you need only one set of if_search tags, wrap that entire block of code in it.
Last edited by els (2008-09-15 22:25:08)
Offline
Re: Search Page
Els wrote:
-Honestly, do you ever take some time to read
What? :S How does those attributes change anything? They’re for the max and min only right, unless I’m missing something, please explain. x
~ Cameron
Offline