Layout Blocks and Group ID

Hi there.

The documentation does not say much about how to use the group ID for layout blocks.
I still have problems to use layout blocks. Maybe it is because of the group ID.

When i have a sticky header and a footer that follows the end of a page and want both to be a layout block, is it smart to give them the unique ID’s 99 and 98 (as an example here) to avoid conflicts with other layout blocks? Especially when i use the hide feature?

Additional question: does the group ID apply to each page or to the entire project?

Would be a great topic for a new tutorial.

Mr. F.

Group ID’s on Layout blocks are very similar to those used for Popups. You can assign several layout blocks to the same ID (eg ‘0’). This will affect what happens to them when you trigger the visibility of a layout block from, say, a button. Having a button make a layout block visible, also gives you the option of closing other layout blocks. However, those other layout blocks must have the same group ID for this to work. If you want layout blocks to remain visible when another one is triggered, you could simply choose not to have other blocks close automatically, but if you have several groups of layout blocks on a page where some are only displayed one block at a time, whilst others are allowed to be open simultaneously you would give them different Group ID’s. The ID assignment has no other effect, so you can use whatever number suits you.

This probably make better sense when you consider a real-life example. Assume you have two mega menus set up in a two layout blocks. These menus are set to appear when a button is clicked on the page, and set to hide when it when the button is clicked again. However, you only want users to see one menu at a time. Therefore, you would set the toggle action of each of the mega menu buttons to close all other open layout blocks - essentially, selecting either of the mega menu options replaces the one that is already open.

Now consider, further down your page you add an Image/video grid and maybe a layout grid. These are both layout blocks and should be given a separate group ID. If you don’t do this, activating the mega menu options will close your Image/Video grid and your layout grid further down the page because they have the same Group ID as your mega menus.

Edit: You did ask for a tutorial, so visit THIS link to see an example of how this all works. There is a download link for the project file within the demo page.

2 Likes

Hi @francbrowne

Thank you. This makes things understandable for me.
:+1:

Mr. F.

1 Like