WAIT: Hook bricks_before_header does not work in the editor

Browser: all
OS: all
URL: no - adult content

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.

1 Like

Hi @Mike8040,

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?

Adding my voice here.

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.

2 Likes