Access to layout settings like cbGetFieldContent

Hello Mark and Team!

I create an onpage menu with cbGetFieldContent - and it works fine.
A new requirement is now to use a layout setting of a layout (e.g. “Title”). But of course cbGetFieldContent works with fields and uses the property content (contentblocks -> linear).
Do you have a solution for my requirement? I want to avoid searching in the property contentblocks -> content.

So far I combined a template with a layout and a header. This way, every time I add this template, I have the right layout and a header element in the right place.

Thank you for your help.