Closed (fixed)
Project:
Image
Version:
6.x-1.0-beta6
Component:
image_gallery
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Sep 2010 at 20:18 UTC
Updated:
23 Sep 2010 at 03:01 UTC
Hello,
Please help me: how I'll know if drupal is displaying an image gallery from other module?
For example if drupal is displaying an image gallery i need to display a block from my custom module but if drupal display any other content type hide that block.
I tried with "if(variable_get('image_gallery_nav_vocabulary',NULL)){//the code here}" but is not working.
Thank You very much!!!
Comments
Comment #1
joachim commentedThe image_gallery_nav_vocabulary variable is just the vid of the vocab that represents galleries. Testing against that tells you exactly nothing.
You basically need to test the path -- what this is depends on whether you are using Views or not.
Comment #2
SilviuChingaru commentedI'm not using views... can you give me a simple example on how shoud i check the path? shoud i use drupal_get_destination or what func?
Sorry for my nob questions but i'm in hurry with this project and... I don't have so much time for research.
Thank you very very much joachim!
Comment #3
joachim commentedUse arg(). Bit ugly but until Drupal has a proper notion of context that's all there is really.
Comment #4
SilviuChingaru commentedThank is what i needed... Thank you very much you saved me a lot of time.