In Admin Panel we have the opportunity to hide/show a block for specific modules. The admin link is :
"index.php?module=Blocs&type=admin&func=modify&bid=xxx"
There, you will find the "Block placement filtering" section.
Click on the "Click to show/hide advanced block placement options" link to show the list of modules where you want the block to be saw.
....quite simple ! but more diffucult when we want to show the block only for a specific function of a module.
Is someone able to show me an example about what kind of datas we have to put in these 3 fields :
[*]Function type(s)
[*]Function
[*]Custom Arguments
i have try many possibilities but nothing works (for ex):
[*]Function type(s) = user or admin ...
[*]Function = func or file or type ...
[*]Custom Arguments = archives or view ...
Thanks to tell me how to configure this feature with an example or is this feature buggy ? (don't work yet ?)
--
keep an eye Open
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Block placement filtering feature
-
- Rank: Registered User
- Registered: Dec 31, 1969
- Last visit: Jul 26, 2008
- Posts: 6
-
- Rank: Softmore
- Registered: Jan 22, 2008
- Last visit: Apr 04, 2010
- Posts: 130
It depends on which module your wish to show. An example using the content module would be:
[*]Function type(s) = user
[*]Function = view
[*]Custom Arguments = pid=1
--
David
-
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
Seems that you're putting the values in the wrong place:
[*]Function type(s) = user or admin ... OK
but you might not use admin type in the homepage or yes?
[*]Function = func or file or type ... ??
file is an old parameter, this feature is for pnAPI compliant modules
and Function is the func parameter
[*]Custom Arguments = archives or view ...
archives or view? this seems the function name
and as Davis said, here you put the parameters:
param1=value1,param2=value2
--
- Mateo T. -
Mis principios... son mis fines -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Aug 08, 2008
- Posts: 2
DavidJ
It depends on which module your wish to show. An example using the content module would be:
[*]Function type(s) = user
[*]Function = view
[*]Custom Arguments = pid=1
I haven't been able to get this working either. I have an RSS feed center block which I'd like to display only on a particular page made with the Pages module.
I've checked "Pages" in the checkbox under the "The following options allow the display of the block to be restricted to certain modules and module functions"
Then what I've tried is:
Function type(s) = user
Function = display
Custom Arguments = pageid=2 (the particular page from Pages I'd like it to display on)
For the life of me I can't see why it doesn't work. Any help would be appreciated.
Thanks! -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
Pages checked
Function type(s) = user (optional)
Function = display
Custom Arguments = pageid=2
Temporary proof:
http://dpahl.com/index.php?module=Pages&func=display&pageid=2
http://dpahl.com/index.php?module=Pages&func=display&pageid=1
--
David Pahl
Zikula Support Team -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Aug 08, 2008
- Posts: 2
Thanks, David...so from what you're showing me, it appears I've done it correctly but it's not displaying for me. I can't figure out what I'm doing wrong :(
It's a fresh Zikula install, 1.0.1 with the basic modules installed.
I had the same problem on another recent install of 1.0.0 and would love to figure this out. It seems so straight forward but I can't see what is causing the problem. -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
I am running zk 1.0.2 (unreleased), here. I will check the fixes, but I didn't recall a block filter error. Not sure off hand what would thwart a filter.
--
David Pahl
Zikula Support Team -
Unregistered
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 4294967287
Thank you all for your help to understand how this feature works. Sorry for the delay to answer but i was away. In fact this feature works well for a module but i got an other interesting question. You are able to select multiple module where to show the block, but the filter do not ditinguish for what module it should apply. Thus the block doesn't show for every modules they don't have this specific function or argument. So we have to create the same block multiple time for the other modules. Am i right ?
It should be great to have an extra field to indicate for what module the function is. every function for the same module separate with coma "," and a ";" for the next module like this:
[*]Modules = News; Topics; Reviews;
[*]Function type(s) = user; user; user;
[*]Function = view, display; (no func filter for Topics) ; show;
[*]Custom Arguments = pid=1; sid=2; (no custom arguments for Reviews);
What do you think about that ?
-
- Rank: Softmore
- Registered: Nov 25, 2007
- Last visit: May 30, 2010
- Posts: 166
Neat. How did "Unregistered" manage to post?
--
Help Now! Fast and affordable help for do-it-yourself webmasters from Wicked Viral :: Chicago's Only Web Development Firm Specializing in Social Networking Integration -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
@dreamingmonkey:
Hehehe, his session expired until he wrote that post,
happened to me a couple of times...
@keops:
Indeed a nice idea, currently there's a strange piece of code in the pnBlocks:
Code
Seems that filer.modules should be an array, but how?
i guess that you propose a cool format, have to build a patch to get this in 1.1
and see if that line is a buggy one in the current SVN...
--
- Mateo T. -
Mis principios... son mis fines -
- Rank: Softmore
- Registered: May 10, 2010
- Last visit: May 18, 2010
- Posts: 165
Bringing this back to the top...
Is it possible to have multiple arguments in the advanced placement options? I want to only show a block when viewing a certain PageMaster tid and pid, e.g. http://govargo.com/index.php?module=section&func=viewpub&tid=1&pid=4
I put pid=4 in the function arguments field and it works great. But if I visit another PageMaster tid that also has a pid=4, then, of course, the block shows there also, and I don't want it to. So I tried adding the argument tid=1 to the function arguments. I tried separating the two arguments with a comma, semicolon, ampersand and space but none of them have the expected results. In fact, when using the comma, it shows the block twice when both arguments are met.
How can I get this working? Thanks!
Zikula 1.2.4, PageMaster 0.4.2
--
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
