Quantcast

Admin Theme and MM Block Propagation Questions

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Admin Theme and MM Block Propagation Questions

Jay Dansand
Hey all!

I've tried looking through the GUI and did not find any easy ways to accomplish these 2 feats but they seem like common enough needs that maybe others have already solved them.  So, before we go off and deep-dive the code and write some crazy hooks, I just wanted to ask the list:

1) Say we create an MM Block type called "Hero Graphic." We create a page at /foo/hero-graphic-block and under Menu and Layout assign it to the "Hero Graphic" MM Block.  Now when I visit /foo I see the "hero-graphic-block" content as expected.  Hooray!  But, I would like the hero graphic block to *not* propagate to subpages.  In other words, when I visit /foo/bar or /foo/baz I do not want to see the hero-graphic-block content.  Is that easily accomplished in any way?  Right now we have the actual "Hero Graphic" block set (under admin/structure/block) to just display on mm/123 to limit it to the top-level page.  A possible programmatic solution would be to implement hook_block_list_alter and check the requested page's MM flags to see if some custom flag (like "Show Hero Graphic") existed; that would at least allow some users (who don't have admin/structure/block access) to enable/disable the block via MM settings.  Is there a better way?

2) Is there a good way (within MM; obviously we can do this via hook or contrib module) to make e.g. mm/settings use a different (admin) theme?

Thanks in advance!

-- 
Jay Dansand '08
Senior Web Application Developer
Technology Services, Seeley G. Mudd Library
Lawrence University
Appleton, WI
920-832-6585
[hidden email]


---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=711838
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Admin Theme and MM Block Propagation Questions

McBride, Ian S.
The solution we've been using for (1) is to create an empty "hero-graphic-block" on the sub-pages of /foo where we want to stop propagation.

If we were to program a solution, we'd probably add a flag for this purpose.
________________________________________
From: Jay Dansand <[hidden email]>
Sent: Wednesday, February 11, 2015 5:41 PM
To: Monster Menus Development
Subject: Admin Theme and MM Block Propagation Questions

Hey all!

I've tried looking through the GUI and did not find any easy ways to accomplish these 2 feats but they seem like common enough needs that maybe others have already solved them.  So, before we go off and deep-dive the code and write some crazy hooks, I just wanted to ask the list:

1) Say we create an MM Block type called "Hero Graphic." We create a page at /foo/hero-graphic-block and under Menu and Layout assign it to the "Hero Graphic" MM Block.  Now when I visit /foo I see the "hero-graphic-block" content as expected.  Hooray!  But, I would like the hero graphic block to *not* propagate to subpages.  In other words, when I visit /foo/bar or /foo/baz I do not want to see the hero-graphic-block content.  Is that easily accomplished in any way?  Right now we have the actual "Hero Graphic" block set (under admin/structure/block) to just display on mm/123 to limit it to the top-level page.  A possible programmatic solution would be to implement hook_block_list_alter and check the requested page's MM flags to see if some custom flag (like "Show Hero Graphic") existed; that would at least allow some users (who don't have admin/structure/block access) to enable/disable the block via MM settings.  Is there a better way?

2) Is there a good way (within MM; obviously we can do this via hook or contrib module) to make e.g. mm/settings use a different (admin) theme?

Thanks in advance!

--
Jay Dansand '08
Senior Web Application Developer
Technology Services, Seeley G. Mudd Library
Lawrence University
Appleton, WI
920-832-6585
[hidden email]


---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685439.7e7cbccf9bb225cf8471bffe1cb67503&n=T&l=monster_menus&o=711838
or send a blank email to [hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=711839
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Admin Theme and MM Block Propagation Questions

Dan Wilga-2
In reply to this post by Jay Dansand
(1) has been a thorn in our side for a long time, and Ian's solution is
the only one that works without admin trickery. To clarify: you need to
create empty subpages for foo/bar, foo/baz, etc. and assign them to the
Hero Graphic block.

Another workaround is to have a different theme at the /foo level which
includes a region not present in the theme used at /foo/bar. This is
obviously not a great solution, either.

As I hinted, this is something I'd like to solve in a more user-friendly
way. But we've been thinking about it on and off, and have yet to come
up with a scheme that both accomplishes what we want and isn't confusing
(the state of things now is confusing enough!) I'm open to suggestions.

As far as (2) goes, the short answer is "no". We use a very basic theme
for all admin pages, as set on admin/appearance. Why do you need a
different one just for admin/mm/settings?

If you do decide to write module code, I think it can be done within
hook_menu_alter() by setting the 'theme callback' element for a
particular page.

On 2/11/15 5:48 PM, McBride, Ian S. wrote:

> The solution we've been using for (1) is to create an empty "hero-graphic-block" on the sub-pages of /foo where we want to stop propagation.
>
> If we were to program a solution, we'd probably add a flag for this purpose.
> ________________________________________
> From: Jay Dansand <[hidden email]>
> Sent: Wednesday, February 11, 2015 5:41 PM
> To: Monster Menus Development
> Subject: Admin Theme and MM Block Propagation Questions
>
> Hey all!
>
> I've tried looking through the GUI and did not find any easy ways to accomplish these 2 feats but they seem like common enough needs that maybe others have already solved them.  So, before we go off and deep-dive the code and write some crazy hooks, I just wanted to ask the list:
>
> 1) Say we create an MM Block type called "Hero Graphic." We create a page at /foo/hero-graphic-block and under Menu and Layout assign it to the "Hero Graphic" MM Block.  Now when I visit /foo I see the "hero-graphic-block" content as expected.  Hooray!  But, I would like the hero graphic block to *not* propagate to subpages.  In other words, when I visit /foo/bar or /foo/baz I do not want to see the hero-graphic-block content.  Is that easily accomplished in any way?  Right now we have the actual "Hero Graphic" block set (under admin/structure/block) to just display on mm/123 to limit it to the top-level page.  A possible programmatic solution would be to implement hook_block_list_alter and check the requested page's MM flags to see if some custom flag (like "Show Hero Graphic") existed; that would at least allow some users (who don't have admin/structure/block access) to enable/disable the block via MM settings.  Is there a better way?
>
> 2) Is there a good way (within MM; obviously we can do this via hook or contrib module) to make e.g. mm/settings use a different (admin) theme?
>
> Thanks in advance!
>
> --
> Jay Dansand '08
> Senior Web Application Developer
> Technology Services, Seeley G. Mudd Library
> Lawrence University
> Appleton, WI
> 920-832-6585
> [hidden email]
>
>
> ---
> You are currently subscribed to monster_menus as: [hidden email].
> To unsubscribe click here: http://lists.middlebury.edu/u?id=685439.7e7cbccf9bb225cf8471bffe1cb67503&n=T&l=monster_menus&o=711838
> or send a blank email to [hidden email]
>
> ---
> You are currently subscribed to monster_menus as: [hidden email].
> To unsubscribe click here: http://lists.middlebury.edu/u?id=685500.19fa7de7038497527f6a88cf1629251d&n=T&l=monster_menus&o=711839
> or send a blank email to [hidden email]



---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=711861
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Admin Theme and MM Block Propagation Questions

Jay Dansand
In reply to this post by Jay Dansand
Ugh I was totally confusing with #2. Sorry! The problem isn't admin/mm/settings, it's any MM page's /settings (or node/add, node/edit, etc.).

The reason is our new theme (Bootstrap-based) requires jQuery Update, and we've mostly squashed all of the bugs, but some things (like the Media module) are just terribly brittle in jQuery 1.9+ and it might just be easier for us to use the simple admin theme (and thus Drupal stock jQuery version) on those administrator-y pages.

My suggestion for #1: There seem to be a billion different reasonable places where the appearance or inheritance or depth of inheritance/whatever could be set, but a granular solution might just be that for any page you can set which blocks (if any) will be inherited from ancestors, defaulting to inherit all blocks (to preserve the current behavior).

So, returning to the previous toy example, on /foo/baz you could uncheck "[ ] Inherit 'Hero Graphic'" and it would disappear there (and from all /foo/baz/xyz descendant pages), but it could still show up on /foo/bar (and that might be a good thing, depending on the block - I can imagine a block that you *mostly* want to inherit down, *except* on a handful of pages).

I think that'd be reasonably straightforward because for any given page X, if the content maintainer visits it and says "gee whizz, why is this block here?" they can go to Page Settings right then and there and turn it off.  If, on the other hand, they go to a page and say "gee whizz, why *isn't* that block here?" again they can look at that page's settings and find the culprit - there's nothing really implicit going on.

-- 
Jay Dansand '08
Senior Web Application Developer
Technology Services, Seeley G. Mudd Library
Lawrence University
Appleton, WI
920-832-6585
[hidden email]

-----Original Message-----
From: Dan Wilga [mailto:[hidden email]]
Sent: Thursday, February 12, 2015 9:35 AM
To: Monster Menus Development
Subject: Re: Admin Theme and MM Block Propagation Questions

(1) has been a thorn in our side for a long time, and Ian's solution is
the only one that works without admin trickery. To clarify: you need to
create empty subpages for foo/bar, foo/baz, etc. and assign them to the
Hero Graphic block.

Another workaround is to have a different theme at the /foo level which
includes a region not present in the theme used at /foo/bar. This is
obviously not a great solution, either.

As I hinted, this is something I'd like to solve in a more user-friendly
way. But we've been thinking about it on and off, and have yet to come
up with a scheme that both accomplishes what we want and isn't confusing
(the state of things now is confusing enough!) I'm open to suggestions.

As far as (2) goes, the short answer is "no". We use a very basic theme
for all admin pages, as set on admin/appearance. Why do you need a
different one just for admin/mm/settings?

If you do decide to write module code, I think it can be done within
hook_menu_alter() by setting the 'theme callback' element for a
particular page.

On 2/11/15 5:48 PM, McBride, Ian S. wrote:

> The solution we've been using for (1) is to create an empty "hero-graphic-block" on the sub-pages of /foo where we want to stop propagation.
>
> If we were to program a solution, we'd probably add a flag for this purpose.
> ________________________________________
> From: Jay Dansand <[hidden email]>
> Sent: Wednesday, February 11, 2015 5:41 PM
> To: Monster Menus Development
> Subject: Admin Theme and MM Block Propagation Questions
>
> Hey all!
>
> I've tried looking through the GUI and did not find any easy ways to accomplish these 2 feats but they seem like common enough needs that maybe others have already solved them.  So, before we go off and deep-dive the code and write some crazy hooks, I just wanted to ask the list:
>
> 1) Say we create an MM Block type called "Hero Graphic." We create a page at /foo/hero-graphic-block and under Menu and Layout assign it to the "Hero Graphic" MM Block.  Now when I visit /foo I see the "hero-graphic-block" content as expected.  Hooray!  But, I would like the hero graphic block to *not* propagate to subpages.  In other words, when I visit /foo/bar or /foo/baz I do not want to see the hero-graphic-block content.  Is that easily accomplished in any way?  Right now we have the actual "Hero Graphic" block set (under admin/structure/block) to just display on mm/123 to limit it to the top-level page.  A possible programmatic solution would be to implement hook_block_list_alter and check the requested page's MM flags to see if some custom flag (like "Show Hero Graphic") existed; that would at least allow some users (who don't have admin/structure/block access) to enable/disable the block via MM settings.  Is there a better way?
>
> 2) Is there a good way (within MM; obviously we can do this via hook or contrib module) to make e.g. mm/settings use a different (admin) theme?
>
> Thanks in advance!
>
> --
> Jay Dansand '08
> Senior Web Application Developer
> Technology Services, Seeley G. Mudd Library
> Lawrence University
> Appleton, WI
> 920-832-6585
> [hidden email]
>
>
> ---
> You are currently subscribed to monster_menus as: [hidden email].
> To unsubscribe click here: http://lists.middlebury.edu/u?id=685439.7e7cbccf9bb225cf8471bffe1cb67503&n=T&l=monster_menus&o=711838
> or send a blank email to [hidden email]
>
> ---
> You are currently subscribed to monster_menus as: [hidden email].
> To unsubscribe click here: http://lists.middlebury.edu/u?id=685500.19fa7de7038497527f6a88cf1629251d&n=T&l=monster_menus&o=711839
> or send a blank email to [hidden email]



---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=849053.214f550f57fa54a976b5f2d087b6d379&n=T&l=monster_menus&o=711861
or send a blank email to [hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=711867
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Admin Theme and MM Block Propagation Questions

Hilary Caws-Elwitt
In reply to this post by Jay Dansand
We use the sub-theme workaround for (1), and it works really well for a single block or set of blocks--of course it would be a pain otherwise. The alternate theme is available to site managers and they can just switch them out as desired for whichever pages or branches they want. We find that much less confusing than empty subpages for end users.
--
Hilary Caws-Elwitt
IT Analyst - Five Colleges, Inc. - http://www.fivecolleges.edu
97 Spring St, Amherst MA 01002
[hidden email] - 413-542-4022


-----Original Message-----
From: Dan Wilga [mailto:[hidden email]]
Sent: Thursday, February 12, 2015 10:35 AM
To: Monster Menus Development
Subject: Re: Admin Theme and MM Block Propagation Questions

(1) has been a thorn in our side for a long time, and Ian's solution is
the only one that works without admin trickery. To clarify: you need to
create empty subpages for foo/bar, foo/baz, etc. and assign them to the
Hero Graphic block.

Another workaround is to have a different theme at the /foo level which
includes a region not present in the theme used at /foo/bar. This is
obviously not a great solution, either.

As I hinted, this is something I'd like to solve in a more user-friendly
way. But we've been thinking about it on and off, and have yet to come
up with a scheme that both accomplishes what we want and isn't confusing
(the state of things now is confusing enough!) I'm open to suggestions.

As far as (2) goes, the short answer is "no". We use a very basic theme
for all admin pages, as set on admin/appearance. Why do you need a
different one just for admin/mm/settings?

If you do decide to write module code, I think it can be done within
hook_menu_alter() by setting the 'theme callback' element for a
particular page.

On 2/11/15 5:48 PM, McBride, Ian S. wrote:

> The solution we've been using for (1) is to create an empty "hero-graphic-block" on the sub-pages of /foo where we want to stop propagation.
>
> If we were to program a solution, we'd probably add a flag for this purpose.
> ________________________________________
> From: Jay Dansand <[hidden email]>
> Sent: Wednesday, February 11, 2015 5:41 PM
> To: Monster Menus Development
> Subject: Admin Theme and MM Block Propagation Questions
>
> Hey all!
>
> I've tried looking through the GUI and did not find any easy ways to accomplish these 2 feats but they seem like common enough needs that maybe others have already solved them.  So, before we go off and deep-dive the code and write some crazy hooks, I just wanted to ask the list:
>
> 1) Say we create an MM Block type called "Hero Graphic." We create a page at /foo/hero-graphic-block and under Menu and Layout assign it to the "Hero Graphic" MM Block.  Now when I visit /foo I see the "hero-graphic-block" content as expected.  Hooray!  But, I would like the hero graphic block to *not* propagate to subpages.  In other words, when I visit /foo/bar or /foo/baz I do not want to see the hero-graphic-block content.  Is that easily accomplished in any way?  Right now we have the actual "Hero Graphic" block set (under admin/structure/block) to just display on mm/123 to limit it to the top-level page.  A possible programmatic solution would be to implement hook_block_list_alter and check the requested page's MM flags to see if some custom flag (like "Show Hero Graphic") existed; that would at least allow some users (who don't have admin/structure/block access) to enable/disable the block via MM settings.  Is there a better way?
>
> 2) Is there a good way (within MM; obviously we can do this via hook or contrib module) to make e.g. mm/settings use a different (admin) theme?
>
> Thanks in advance!
>
> --
> Jay Dansand '08
> Senior Web Application Developer
> Technology Services, Seeley G. Mudd Library
> Lawrence University
> Appleton, WI
> 920-832-6585
> [hidden email]
>
>
> ---
> You are currently subscribed to monster_menus as: [hidden email].
> To unsubscribe click here: http://lists.middlebury.edu/u?id=685439.7e7cbccf9bb225cf8471bffe1cb67503&n=T&l=monster_menus&o=711838
> or send a blank email to [hidden email]
>
> ---
> You are currently subscribed to monster_menus as: [hidden email].
> To unsubscribe click here: http://lists.middlebury.edu/u?id=685500.19fa7de7038497527f6a88cf1629251d&n=T&l=monster_menus&o=711839
> or send a blank email to [hidden email]



---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=1034715.d8dc340b0014c740c37e95754e54e1f3&n=T&l=monster_menus&o=711861
or send a blank email to [hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=711889
or send a blank email to [hidden email]
Loading...