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

I have followed the tutorial for creating the blog with list view and page view which all works perfectly.

There is one feature however that I would like to add.

In the list view, if there are no blog entries to display (or if all blog entries within the admin have been deleted), I would like to display a message that states 'No blog entries to display' rather than a blank page.

I'm guessing this is a simple fix, but cant yet figure out how to do it.
Any ideas?

We can use the cms:no_results tag for such condition.
An example -
Code: Select all
<cms:pages ..>
      <h3>No blog entries to display</h3>

Hope this helps.
hi KK - I just happened upon this particular bug and your answer - the no_results tag. I couldn't recollect ever seeing that one and searched the documentation for it and got 'no results'! A very useful tag - I know you have a million and one things to do - but would be good to have it in the docs - thanks!
@potato -
No results for no_results - that is a good one :)

The tag is actually mentioned at viewtopic.php?f=5&t=7377 with some more new tags that debuted with 1.3.5.

That said, I agree, I definitely do need to properly document all the new tags.
Works perfectly. So simple when you know how :D

Thanks KK
You are welcome, @dandan :)
Cool! I've been using a longer method that can be seen here.

Code: Select all

    <!--// other code goes here // -->

    <cms:set no_results='1' scope='global' />

<cms:if no_results!='1'>
    <h3>No Results Found</h3>

Glad to learn this new code :D
I'm not primitive, My time machine just malfunctioned in your era.
7 posts Page 1 of 1

Who is online

In total there are 7 users online :: 1 registered, 0 hidden and 6 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 6 guests