By sanjanaa on
Hi,
I am using Monthly Archive, Tag Cloud modules in my blog pages. I want to show these blocks in
Main Blog page,
Archive Pages,
Taxonomy Pages,
Node pages,
single blog pages.
I can't give this list in Block settings. Because each and every entry come with some numerics.
So is there any possiblities to give wild card or regular expression for this?
(like., blog/ , node/, taxonomy/terms/, archive/)
Thanks in advance.
Comments
Yes
Yes you can use wild card settings e.g blog/*
This is in the instructions on the block settings page next to the textfield you input the data in.
There is a 'Page specific
There is a 'Page specific visibility settings' in the Blocks Administration where you can specify the visibility of blocks (you can also specify wildcard characters there) like node/*, blog/* etc...
Works fine
Hi thanks for your timely help.
That working fine.
Facing another problem
Hi,
I am facing another one problem in this too. Your solution is working fine for me. But at the same time, I don't want to show that blocks in Site Pages.
I am using node/* for, to show that particular blocks in single blog entry pages, which url should be
www.example.com/?q=node/123
Similarly, all pages url should be www.example.com/?q=node/100.
So, if i am using node/* in block settings it is showing in all pages too. How to avoid this?
Thanks in advance.
If you only want the block to
If you only want the block to show for blog entries and not other content types you will need to use PHP code, something like
Thanks for your reply
Thanks for your reply nevets.
But I want to show that particular block in
blog
blog/*
archive/*
taxonomy/term/*
and single blog entry pages.
How can I do this?
Thanks in advance...
Would it be easier to say
Would it be easier to say which pages you do not want to show the block? You can set it all so that the block is listed in all pages EXCEPT the ones listed.
No SweeneyTodd. It is not
No SweeneyTodd.
It is not that much easy. Beause I can't give all those pages which are not required that block. Then I have to mention all pages, Editable pages, creation pages and so on.
I think that may be difficult to mention.
Some of the pages will be
Some of the pages will be easy to catch (e.g. admin/*). I am not sure whether the wildcard will work at the beginning of a path (e.g. */edit/*).
Does it matter is a block is visible only on pages you will see, or is this site to be delivered to a third-party?
The other options are:
1) use php to check the path and come up with a more comprehensive set of rules about where to / not to show the menu,
2) use the rules to say which pages the block should be displayed on and use css to hide it on the exceptions (if there are only a couple of these),
3) check out the modules others have suggested,
4) I am not sure whether using Panels for your layout will mean syou have more control over whether the block is visible. I have not tried complex rules in Panels.
You could try this
How about
[Changed call to emtpy() to empty()]
Hi nevets, Thank you so much
Hi nevets,
Thank you so much for your reply. But that php code shows that block in each and every page (admin/edit/my account....) except the login page. But my need is to show in single blog entry page.
(blog
blog/*
archive/*
taxonomy/term/*
and single blog entry pages.)
I don't know why this work like this? Can you please help?
Thanks in advance.
Three thoughts a) Bad
Three thoughts
a) Bad function call, fixed in post above
b) You need the
<?phpand?>tags, added to post abovec) For block visibility you want to select "Show if the following PHP code returns TRUE (PHP-mode, experts only)."
Works fine
Yes Yes Yes.................
Thats works fine now. THANKS THANKS THANKS A Lottttttttttttttttttttt nevets.
You can also use the Context
You can also use the Context module for this purpose: http://drupal.org/project/context
_
In the future please don't post duplicate threads-- there was no reason to start a new thread when you already had people helping you in another thread.
(cross reference: http://drupal.org/node/913250)