Show Widget on multipule layers

Topics: Core, Customizing Orchard, General
Jul 5, 2013 at 12:58 AM
First off everything I want to do can be done with layer as they are now, although I think layers could be improved.

The current setup is that a widget is assigned to 1 layer.

It would seem to me it would be better if widgets could be assigned to multiple layers, i.e. a bunch of check boxes in the admin to select the layers to show widget on.

The main reason for this is that I often find I setup a few layers then I want to remove a few widgets from a page, I then need to edit a bunch of layers. Seems to me it might be better if I could define the layers more as page groups, then it would be easier to manage. Else if I'm not careful you can end up with 1 layer per widget to manage.

Just an idea... any thoughts?
Sep 7, 2013 at 10:47 PM
+1

completely agree. Why can't I create a widget and assign it to different layers?

If I press "move to current layer" the widget gets removed from the other layer.

This means that I have to create the same widget multiple times. This is tedious and clutters the widgets page.

Is there any way to assign one widget to different layers?
Coordinator
Sep 7, 2013 at 11:54 PM
I think you may be taking this from the wrong end. What you need may be different layer rules, not distinct layers. The rules in layers can be complex expressions, and that's even extensible, so yo can add your own criteria.
Sep 8, 2013 at 5:53 PM
ok, so how would I approach the following setup:

I have 3 widgets: features, support, blog archive

And I have 3 types of pages, where I want to display them: feature pages, support pages, blog.

On the features pages I want the following widget order: Features, Support, Blog Archive

On the support pages I want the following widget order: Support, Features, Blog Archive

And on the blog I want the following widget order: Blog Archive, Features, Support.

Is there any way to achive this without recreating the widgets for every layer and then moving them in correct position?

Thx
Coordinator
Sep 8, 2013 at 9:04 PM
That's a different scenario from the one jrmurdoch was describing. His would be handled just fine with a better set of layer rules. I would find your navigation a little disconcerting as a user, but what jrmurdoch is proposing is not going to help with this anyway. You would need more than checkboxes, you'd need different ordering of the same widgets in each layer. If the order must be different in different places then yes, for the moment you'd need to duplicate the widgets.
Seeing that this has bothered literally nobody that we know of until now, I would suggest that you build that feature as a separate module and publish it on the gallery.