Hello,

You know the visibility settings on hook_block?

How do I make multiple pages like

pages/*
stories/*
etc.

An array doesn't work.

Thanks!

Comments

jludwig’s picture

Use line breaks to separate the paths.

Example: 'pages' => "comment\ncomment/*\nforum\nforum/*" would have this:

comment
comment/*
forum
forum/*

Tiuya’s picture

That worked, thank you!

One problem. My page doesn't seem to be sowing up on the block build page. I can access it by going to the direct path, but it's not on thw list.

dpearcefl’s picture

if I understand your question correctly, you may want to look here: http://drupal.org/node/783378

dpearcefl’s picture

When I use this:
'pages' => 'video-library\nvideo-library/*',
This winds up in the database:
video-library\\nvideo-library/*

My backslashes are getting escaped!

dpearcefl’s picture

Single quotes vs. double quotes around the list of pages. Sheesh. This works:
'pages' => "video-library\nvideo-library/*",

optimusprime619’s picture

Thanks for bringing this up!