How to hide a block from within the Block
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks
Author Message
layingback
Forum Admin


Joined: Apr 19, 2004
Posts: 953

PostPost subject: How to hide a block from within the Block
Posted: Fri Jun 18, 2010 4:18 pm
Reply with quote

Is there any way to cleanly hide a block entirely from within the block? Say I discover no records to display, rather than a dumb message "There are no records to display" I'd rather just suppress the entire block, including the block header, and save the space.

I realise that I can simply set
Code:
$content = '';
but that leaves a Warning:
"There appears to be a problem with this block".

A Notice might be OK, but I'd prefer to avoid Warnings.

_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website
greenday2k
Forum Admin


Joined: Aug 11, 2005
Posts: 484
Location: CO

PostPost subject: Re: How to hide a block from within the Block
Posted: Fri Jun 18, 2010 4:32 pm
Reply with quote

$content .= "error";
or try
$content .= ERROR;

_________________
www.greenday2k.net



greenday2k's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website MSN Messenger Yahoo Messenger
layingback
Forum Admin


Joined: Apr 19, 2004
Posts: 953

PostPost subject: Re: How to hide a block from within the Block
Posted: Fri Jun 18, 2010 10:23 pm
Reply with quote

Thanks!

Actually the first gives the block with the text error in it, the 2nd works but gives a Notice (ERROR assuming 'ERROR'). So $content = 'ERROR'; works perfectly!

Thanks for the guidance!

_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Dedicated Server & Bandwidth Sponsored by DedicatedNOW
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.4459 seconds with 19 DB Queries in 0.0887 seconds
Memory Usage: 2.87 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy