thank you for the quick answer. Unfortunately, this is not exactly what I’m looking for.
I would like to have a way to change flexible between the page properties full width (without sidebar) and content with right sidebar depending e.g. if a user is logged in or not.
In case the user is not logged in, I would like to show a sidebar with “login sidebar” and possibly other widgets and if the user is logged in I want to show another content on the page witch uses the whole wide of the page without a sidebar.
I would like to have a function in a template php-file.