Hello,
I have a menu block (menu block module) in my sidebar that is showed if there are children menu links of a certain level. The menu block is not always displayed because all pages don't have menu links of that level.
I have another block that is displayed (textual), but I would only like to display it when the first block mentioned above is not displayed on the page.
I looked into the menu_link_children_relative function but wasn't able to make it work.
I'm wondering if there's a way to make a php conditional snippet to only display a block if another block is NOT being displayed on the page.
Something like:
if ($block1 != TRUE) {
print $block2;
}
If not, is there a way for me to find the depth of a page and whether or not there are menu link children for this node?
Thanks for your help,
Comments
Any recommendation on what
Any recommendation on what function to use, module, or menu link options?
Thanks,
I am looking for the exact
I am looking for the exact same thing...
I have a custom block that I made with a link to an Ubercart product. I want that block to be hidden if the Ubercart cart block is displayed. I have my Ubercart Cart block set to "show only if items in cart".
So my custom "Upgrade Membership" block should be hidden if the Ubercart Cart block is showing.