Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By smilodon on
How do show a block entirely to only loged in users.
With the help of this guide:
http://drupal.org/node/13266
I managed to create a custom block. Its content is not visible if i log out and i see the content if i log in. But i still see the block title in both cases, eaen if i am loged out. This is kind of ugly for guests to see an emty block, with only the title... no content.
So, how to hide the block entirely ?
Comments
Return nothing
If you return nothing, the block won't show up at all. If you are doing that and it's showing up then something is messed up in you install.
Michelle
Create your block and....
Set the option to hide it by default and allow the user to choose it.
Turn it on by default for your users. The only drawback is that they can turn it off - is that a problem?
Paddy.
http://deburca.org, and http://amadain.net
Paddy.
http://deburca.org
My fault..
There are many examples.. i keeped testing them, and some worked pefrfect, some didnt. I dont think my install is messed up... Anyway, thanx for replying.