I would like to wrap my main page logo and my Main menu inside 1 Div, in order to effect how they display together responsively on different screens.

I have a Home Layout that has the Primary Navigation and Logo ("Header Block") both sitting in the HEADER region on the Home Layout Editor.

In Inspector / Theme debugging the Template name suggestions are suggesting that these 2 blocks can't be controlled together by 1 template file.

In order to wrap them together in 1 div it looks like I will need to print (render) them within a template;
rather than just letting them appear as they currently do via the Layout's auto display.

Any ideas how I can do that?

(particularly menus as I'm not sure on the php terminology to render a menu)

Comments

hoping for some help on this one?

It's not entirely clear to me what you are going to do, but I think I can help you find the code you are looking for. If you look in the core menu module, the function that implements 'hook_block_view' calls another function to display the menu, "system_menu_block_build".

By the name of this function (starting with "system_") we know that it exists in the core "system" module. You can also search the repository on github for this function name to find it. In this case it is in the "system.menu.inc" file.

Examining that code may provide some answers.

Am I right in thinking that "system_menu_block_build" would be referring to the CMS editor (Backdrop) Menu ?  I am wanting to render the Main Navigation menu that the general public will see. Is that also accessible via this?

I don't understand sorry. Is there any real-world examples you could give within the context of a .tpl.php file?

Also not understanding your intent here sorry. Could we have a diagram or something?

I may have over-explained what my intention is.

So let me try again as simply as a I can:

There are 2 items @ top of my site that Backdrop CMS currently styles/controls via different files.

These are: The site Logo; and the Main Menu.

I wanted to wrap those 2 items into 1 div.

How would I do that?