Since Bricks is unable to provide multi row header support with sticky condition for the navigation only I went the complicated route to add the top bar as a section template using the conditions with Hook settings “bricks_before_header”.
On the front end the top bar is rendered correctly above the header template. In the bricks editor the top bar is always shown below the header. This makes the editing a nightmare.
This solution is way apart what I consider sane and I dislike it, since with multi language support through Polylang one ends up having dozens multiple templates just for a freaking header with a top bar and hero with breadcrumbs… The solutions posted with Java and the css hack are not working and should not be needed in the first place.
//Edit: I would like to add that none of the sections that are misused for header elements (top bar and hero banner with bricks_before_header & bricks_after_header) is shown in any Bricks editing scenario. With this workaround one gets even further punished. This makes editing the site a pain in the but because the visual appearance is incomplete everywhere as one only sees 1/3 of the main website header.
Yeah, you’re right, I agree the current way of creating “multilevel headers” is not ideal. It can certainly be improved.
However, I have a question: you mentioned “In the bricks editor the top bar is always shown below the header”, I don’t think that’s supposed to happen with the current implementation. At least that’s not the intended behaviour. Can you please share more about your setup and how to replicate it?
I can confirm this is an issue. It is annoying to use the hook to set a template for a header top/bottom bar. I had to set a bottom bar using the bricks_after_header hook because the header is sticky but the bottom bar should not be. Not sure how you decouple that.
If a template is set using bricks_before_header or another hook, the template should be editable separately, like the header/footer templates are. These templates should be displayed in the editor where the hook exists.
I’m not sure what I would propose as a solution for the top/bottom bar in header situation. Taking a stab at this, I think having a button to add these top/bottom sections might be good to do.
Well, I got used to live with that condition and appreciate at least that it is somewhat possible as I would have needed to switch the builder. The header is a core element and also provides essential usability tools for end users. Right now the usability for us designer is screwed.
I would actually I either suggest to Bricks to offer us to define a container within the header that is sticky where the rest is not (maybe complicated and error prone) or provide dedicated “Top Bar” and “Hero Section/Bottom Bar” templates that can be defined like the header template to be stick or not and have priority like the header element.
I just updated the title to “no bug” as this is the intended behaviour. I left it as “wait” previously as I agree that the current flow is not ideal. I have shared the feedback internally though to look for ways to improve the experience.