Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Hi,

search.php

Code: Select all
<cms:search limit='10'>
</cms:search>


How do I react with a message, if search.php has no s-parameter (domain.com/search.php) or the given parameter has no hits(domain.com/search.php?s=748rhjiewuegzg)?

Have I to handle it with pure PHP?
Hi,

<cms:no_results /> tag -
for an example please see viewtopic.php?f=4&p=13117#p13122

Hope this helps.
Great, thank you. I have a following question:

Does a not operator exist? I would like to shorten the following if statement and couldn't find anything in the doc.

Code: Select all
<cms:set GPCS="<cms:gpc 's' />"  />

<cms:if GPCS >
    <cms:else />
    <p>No search parameter.</p>
</cms:if>
You may use either this -
Code: Select all
<cms:if GPCS='' >
    <p>No search parameter.</p>
</cms:if>

or this -
Code: Select all
<cms:if "<cms:not GPCS />" >
    <p>No search parameter.</p>
</cms:if>

Please see viewtopic.php?f=5&t=7377 ("5. 'not' tag" section) for details.

Hope this helps.
4 posts Page 1 of 1
cron