I have created a custom content type for campaign'campaign' in my module using:
hook_node_info()
hook_node_info()
and addadded fields using:
hook_field_group_info().
hook_field_group_info()
. This campaign content type will be showingshown to userusers site wide in modalmodals/popuppop-ups using CTOOLCTool modal on page load.(hook_init ()hook_init()
).
What I'm looking for is, to give an option to ADMINadmins to restrict this popuppop-up/modal for different roles or paths.
Same Same like BLOCKblock section is doing, for. For example whether to show a block on node/104node/104
or not.
OR
Show, or wether to show a block for (Anonymousanonymous) usersusers only or vise versanot. Like shown in the screenshot below.
So![enter image description here][1] [1]: https://i.sstatic.net/BccU1.png
My aim is that, while creating campaign ADMIN will'campaign' nodes, admins should be able to select pages or roles to show that particular campaign or not.
Can you please guide me that how can I use Drupal block section logic here,that will save my day, or should I? Or do you maybe can make some code for thissuggestions I can start with in my custom module?
Any help would be appreciated.
Cheers
-Zafar