How can I configure block visibility to show only in node view pages? (not in node edit and create pages)
What should I insert in "Show block on specific pages" > "Only the listed pages"? current config is:
video
node/*
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityUse this in your block configurations page "Show block on specific pages" > "Show if the following PHP code returns TRUE"
if(arg(0) == 'node' && is_numeric(arg(1)) && ((arg(2) == "" || arg(2) == 'view'))) {
return TRUE;
}
Hope this will help.
You will need to enable the core module PHP.
I use the Context Module for this. It allows a more fine grained control than the out-of-the-box drupal-options.
Select the block you wish to exclude and add '/edit' and '/add/*' to the 'Pages' tab in the 'Visibility settings'. You can use 'Content types' in combination with these settings to fine tune a bit further.
contenttypes
instead ofpages
. Then select all contentypes.