can i have a template containing ui elements and actions ?

I have a template theme that i want to use in my application , 

I have a menu that should be in every screen so i've created it in the template,

The problem is that i want the menu bar have ui elements and logic to be present in all screens.

something like login or logout button and there's logic.

I've created it in the template but when i reference the template I have to pass the action at each screen manually

How can the template have it's own elements and logic without passing them in each screen ?

Hi Muhamed,

When you building a layout you can add UI elements to it or screen actions. The UI elements will be visible in all the pages and if those elements use the screen actions of actions of the layout they will use it in all screens that have that layout. For example you can create a logout button on the layout and it calls a screen action of the layout that logouts the user. the screens can't use the screen actions of the layouts (at least without workarounds that I don't recommend). The Layouts possess placeholders where you can create places on the layout that can contain elements that are insert on the screens. I didn't understand why you need to pass actions every time you add a layout to a screen. Are you using events? Can you show us with a print screen or attach a module with a simple example

Regards,

Marcelo