Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi there,

I currently have a 'news' section on a site I manage for a client, where articles are just clones of news.php

These show up on the articles show up on the homepage under a subheading of 'Latest News'

Is there a way that when there are no cloned pages or they are all unpublished, I can have some text appear say "There are currently no news articles" under the subheading? This text would be hidden when articles are shown.

Many thanks for your help. :)
Hi :)

We can use cms:no_results tag within the parent cms:pages loop to cater to such conditions.
Sample code -
Code: Select all
<cms:pages ..>
   ...
   
   <cms:no_results>
      <h3>No pages found</h3>
   </cms:no_results>
</cms:pages>

Hope it helps.
2 posts Page 1 of 1
cron