By: Cyric
Date: 2014-03-11
Time: 19:27
|
Best way to hide block if query is empty.Hi there! I'm been using TBS for some time now, it's really great.
I wanted to know which is the proper way to hide a block if a query returns 0 values. For example, let's suppose I have this:
And in the PHP file, I query the users table but I don't get any results. How can I hide the "userInfo" div? I suppose it's a simple question but I've never really resolved in a "clean" way. Thanks in advance! Cyric |
|
By: Sarah
Date: 2014-03-11
Time: 20:09
|
Re: Best way to hide block if query is empty.Look for 'magnet'
http://www.tinybutstrong.com/manual.php#html_field_prm |
|
By: Cyric
Date: 2014-03-11
Time: 20:36
|
Re: Best way to hide block if query is empty.Hi Sarah. I tried that but I can't make it work. Maybe I'm doing someting wrong.
Here is my real code:
|
|
By: Sarah
Date: 2014-03-11
Time: 21:33
|
Re: Best way to hide block if query is empty.Sorry, I did not notice you were using a block. You will probably want parameter 'bmagnet'
|
|
By: Cyric
Date: 2014-03-11
Time: 21:35
|
Re: Best way to hide block if query is empty.It worked perfectly! Thanks a lot! :)
|