I have a project with a LeftDock configured in “Shared settings”. My goal is to create a new “section” that will use a different Dock.
My impression was that if you add a dock to one of the pages, it will “override” the shared Dock and come into view. This doesn’t seem to be the case. If the dock is in Shared settings, it’s the only dock that will ever show.
(The ‘Corner Priority’ for a page does override shared settings).
Am I missing something or is that the intended function?
Ignition 8.0.13-rc2
Never mind. I did some more testing with Dock Close and Open page events.
I see that if you close one dock and open another when a certain page comes up it accomplishes what I was intending.
Let’s use an example to describe the expected behaviors:
- In the “Shared” Page Configurations, let’s say we have a north-oriented Docked View which uses a View named “StaticTop” which is set to “visible”. This Docked View will be used for EVERY Page I configure within the project, and since it is set to “visible” it should be visible immediately.
- I also have an individual Page Configuration for a page (
/demo
) where I don’t want “StaticTop” to be used for some reason. I configure a different north-oriented Docked View: “OneOff” which I also set to be “visible” because I always want it to be seen.
Using this example, when I navigate to /demo
in a Perspective Session I’ll actually see StaticTop because we have two Docked Views set to be visible, and StaticTop was assigned first.
There are two ways to resolve this:
Correct way:
In the /demo
Page Configuration, make an additional Docked View with a North orientation which uses the “StaticTop” View, but set this Docked View’s “display” setting to “onDemand” and set the “handle” property to “hidden”. Leave the OneOff Docked View as you’d like it.
Alternate Route:
As part of the View onStartup for the View which you do not want the StaticTop Docked View displayed, you can include a scripting call to close the StaticTop Docked View.
There are a couple fo reasons this method is not recommended:
- You might use this View on other Pages, where it would also close the StaticTop Docked View. You should never put anything in a View onStartup script which you don’t want to happen every time a View is opened.
- You have a hard-coded id in the closeDock function call, so if the Docked View’s id ever changes you have to go and find this script and update it.
1 Like
Thank you @cmallonee for the great clarification!
I definitely see the advantages to do it the ‘correct way’ when you just want a ‘one-off’ dock change.
In my instance, I think I need to stick with the alternate route because when I open the ‘section’ homepage, I need that sections menu to stay visible and the only route back is to navigate back to the ‘root’ homepage, where the main menu will again become visible and stay visible.
@cmallonee Thank you for the explaination. But i find the behaviour a bit counter intuitive. Since only one Dock view can be seen at the time, it will be better i think to says that the rather than the first assigned, the latest visible assigned one is visible. When you define for instance a north-oriented Docked view in the Shared settings and, on a certain page, define again a north-oriented Docked view, the intention is clearly to override the one devine on the Shared view.
It might also be interesting to be able for a page to override a shared docked view by defining on the page a docked view with the same id. so if found the page docked view of page is used otherwise the one of the shared view.
For this behavior, you should "override" the "first" docked view with a local definition which declares that the docked view should be visible on-demand, and the "second" docked view should be visible immediately.
While it's easy to say "this is the way it should be", you have to recognize that some of these behaviors were put in place years ago - well before some use-cases were even dreamed of. We can't just change the behavior now because users have immense projects built around this old behavior which does indeed work, even if it doesn't suit everyone's expectations; to change it now and swap the order of which docked view is used would greatly impact other users.
Hi, trying to follow that, but cannot make it work.
Same idea where I have a dockView (west in my case) that I try to override on 1 page only, but that second dockView does not appear.
Not sure if that setup changed since 2020, working on an 8.1.47 version here.
I cant't find anything about any OneOff setup here.
The override to "hide" the "Left menubar" docked view must have the exact same name. You need to remove the " - cnf" bit or this won't work. If you're trying to use a different View, you'll actually have to have yet a third Docked View configuration, where the page has the "shared" config, you "hide" that shared config by re-applying that same view with different display settings, and then your third config which uses the different View.
1 Like
Tried renaming both components the same way saving them on different folders, same thing for Dock ID that I ended up removing, tried different setting on content (cover, push, auto) but my second Left menubar does not appear.
For now I ended up using the same method as 101 demo having a different setting for each page and no shared settings.
Do you know if there is any Demo available on community using such setup that I could look at?
Thanks for your support.
Alexandre
Ignition version 8.1.47
Not what he meant. As in you should have two extra docks defined for the page, 3 in total including the shared one. The first extra should be exactly the same viewpath as the shared dock uses (not just the same view name ) . This will override the shared dock config. This should be overridden to onDemand so it's hidden. And then the second extra dock wh should be your actual dock you want shown
1 Like
All clear now, works fine, thanks for the clarification.
Added down here example of that working fine setup.
On left side, the second docked view over-riding the original one with an onDemand setup.
On right side, my other docked view to be made visible.
2 Likes