I'm trying to show a menu block for an exposed filter result, for a Calendar view. Trying to figure out php to print the block using block visibility settings.

I'm using the "out of the box" calendar-module-view, but added an exposed filter that is hidden with CSS. Then I have a unique menu block per per Business Location. I've read the many other post about not being in the menu system but this would never be in the menu system. Except, I do have a manually entered menu item in the menu block that links to this filter that works fine.

link is:
calendar/?field_class_location_value_many_to_one=Columbia

Tried using url/filter in the block visibility settings with no results. If use just 'calendar' then the block shows since it does have a drupal path but no menu? It may be something that should be but in a .tpl.php?

Comments

crutch’s picture

maybe create a new block, allow php...

<?php
if ( ($_GET['filter0']) andis=toColumbia) :

$block = (object) module_invoke('columbia', 'block', 'view', '2');
print theme('block',$block);

endif;
 
if ( ($_GET['filter0']) andis=toPeru) :

$block = (object) module_invoke('peru', 'block', 'view', '2');
print theme('block',$block);

endif;
?>

The menu blocks are not views though they are menu_blocks

JohnAlbin’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)