I have a sidebar defined in my main layout which most of the time will display the login form. After the user is logged in I need to remove that form and replace it with user data. I also need to change that sidebar when viewing the support section to show the sub-sections.
Do I need to move the element loading to each view or is there another way?
Thanks in advance,
Denis
Bottom line is you’re gonna need an
if($supportpage){} elseif($loggedin){} else{}block. If you don’t want to put it in your layout file you could create an element for each option and thenset()the correct one from theapp_controller:And then put
$this->element($sidebar)in your layout.