Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hi,
I am trying to find the correct tag or way to show a certain message in a listing page when content is not available.

I am building a page for job vacancies. The following is what I have done so far but it is not working.

Code: Select all
 <cms:if k_count gt '0' >
                          .... show the jobs listing page....

                       <cms:else />

                     <h1 class="w3-xlarge w3-margin" style="font-weight:bold;">Vacancies will be available soon!</h1>                       
                </cms:if>       
Harris wrote: Hi,
I am trying to find the correct tag or way to show a certain message in a listing page when content is not available.

I am building a page for job vacancies. The following is what I have done so far but it is not working.

Code: Select all
 <cms:if k_count gt '0' >
                          .... show the jobs listing page....

                       <cms:else />

                     <h1 class="w3-xlarge w3-margin" style="font-weight:bold;">Vacancies will be available soon!</h1>                       
                </cms:if>       


Hi, you could try not_empty tag https://docs.couchcms.com/tags-reference/not_empty.html

It might work with the combination of else tag as well

https://docs.couchcms.com/tags-reference/else.html
@Harris,

I assume you are using <cms:pages> to create the listing -
if that is correct, please see the following for a solution
viewtopic.php?f=4&t=7790

Hope this helps.
Thanks so much KK. The tag 'no_results' worked its magic.
You are welcome Harris :)
Glad it worked.
5 posts Page 1 of 1