I've been trying, for a few weeks, to get the left sidebar to work in a more dynamic way - but I've failed to make it work. I've been using CCK and a computed field in order to create nodes that store a value under the $_SESSION variable - and then created blocks to the left sidebar that should behave based onthe $_SESSION variable.
Basically my node's computed field would be something like:
$_SESSION['current_customer']="Google";
And my left sidebar block would carry a conditional statement:
if ( $_SESSION['current_customer'] == "Google" )
return TRUE;
return FALSE;
I would then have nodes for Google, Yahoo, and other sites.
The nodes are triger or invoked using the "Primary Links" menu. I've noticed that when I create/edit and save the node, the left sidebar block will show the block for the corresponding $_SESSION['current_customer'], but if I click directly on the Primary Links the blocks don't react. I placed some debugging code and see that my $_SESSION variable is indeed changing as I click on my other links, but the block does not appear to do react to it. Is there a trick that I am missing?
Here is a quick view to the issue:
http://www.flickr.com/photos/22121475@N04/2132654055/?addedcomment=1#preview
Comments
Some help required
Could anyone help me out on this one?
Can someone help me with this one?
I've tried just about anything, and I still can't see why the left-sidebar does not react to the $_SESSION['current_site'].
I'm experiencing the same.
I'm experiencing the same. Did you ever come up with a solution?
Thanks,
paul
---------------------------------------------------------------
My drupal site: Vacation-Places