How can I specify multiple node types in an argument (in this case to output an addthis banner only on specific node type pages)?
I succeeded in specifying this for a single node type by changing this line in the module code:
if ($type === 'node' && user_access('view addthis'))
to:
if ($type === 'node' && ($node->type == "website")
I then tried this code to specify two node types:
if ($type === 'node' && (array($node->type, array("website", "portals"))
But the result is that the banner is output on the pages of all my node types and not just the two I specified in the code.
I am not a coder and I have the feeling I am overlooking something basic in defining the array here but what?
Thanks for any help,
Gerben
Comments
Try "OR"
if ($type === 'node' && ($node->type == "website" || $node->type == "portals"))I'm not a very good PHP programmer, but this seems like it should work.
Thank you very much, this
Thank you very much, this works perfectly!
Gerben