Is it possible to add a 'No Articles Found' alert on modules/blocks?

Posted in: Newspaper
Post count: 108

Hi Guys, is it possible to display a ‘No Articles Found’ or similar message when a module/block fails to generate any content?

Thanks
Matt

Post count: 6535

HI

Yes it is possible but you will need to edit the files which generate the blocks and modify the inner() function, just add this line at its end, right before the close_all_tags() method: http://screencast.com/t/9cBDMJY5

else $buffy .='<p> NO POSTS FOUND FOR ' . __CLASS__ . '</p>';

Hope this helps!
Thanks!

Post count: 108

Hi Andrei, that’s sort of worked but I’ve got three sets of block 4 in a row and it’s only printing the alert message for the last one?

null

Thanks
Matt

Post count: 108

Apologies, this is me being stupid, I’d forgot that we were using block 14,14,4 so neglected to add the code to the block 14 php file too. This has 100 sorted the issue, many thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.