Whenever i want to have a block visible on specific node i specify the drupal path in
the block visibility properties as node/X.

However i want my block to be visible on a view page.
As i can't specify the url of the view page in the block visibility properties,
i wonder how to get my block visible on a view page.
Is php the only solution here?

Thanks

Comments

bwv’s picture

Does your View page have a path? If so, you should be able to use that path in the block visibility settings.

held69’s picture

Thanks for your reply

Without succes i have tried to specify the path (just copied the path out of the view) in the block visibility settings.

The block still doesn't display

bwv’s picture

Make sure you have the path entered correctly. It should look something like this:

path/to/view

held69’s picture

As i make use of domain access, my path is http://domain.mysite.com/view

This path works fine as a menu link, however it doesn't work in the block visibility settings.

What should i alter here to make it work in the block visibility settings?

Thanks

bwv’s picture

Then you probably need to make a change in your .htaccess file, where the Rewritebase settings are. See this for more information:

http://drupal.org/node/765876#comment-2825192

held69’s picture

thanks alot for your help sofar.

I am a little confused here about what kind of value to enter here, as my drupal installation seems to be installed in the
Public html (root folder).

Furthermore i make use of domainaccess, having four domains.
I tried to edit the htaccess file by adding the url of my first domain (landing page) behind the rewrite base (RewriteBase /www.domaina.com), however when i trie to login to another domain i get a server error.

held69’s picture

problem solved.
Instead of http://domain.mysite.com/view i just specified view.

mikebell_’s picture

I'd take a look at Context, it allows you even more control over your block (and other things). You can set a block to be active per view, rather than by path which comes in handy.

stefan81’s picture

Context is cool :)
In case if not yet installed:

Is there a more generic php snipped to display on views pages?

Instead path like "if content type xy"

fang27’s picture

I have the same issue; trying to get a menu block to display on the same page as the view. Doesn't work - even with the Context module.

held69’s picture

In my case i specified the second part of my path of the view: yourdomain.com/view

(so just view in this case will do) in the block visibility settings of my block.

hope this helps