I want to show different header and footer for the guest users and default one for the logged-in users.
What is the right way to do so ?
AND using the custom module to achieve this.
I want to show different header and footer for the guest users and default one for the logged-in users.
What is the right way to do so ?
AND using the custom module to achieve this.
Here is my suggestion:
1/ In your block, need to add Customer Group identifier to cache key.
2/ layout_load_before
observer event. Put this event under frontend scope. In your observer, add your layout handle with your conditions.
$layout = $observer->getEvent()->getLayout();
$layout->getUpdate()->addHandle('your_custom_handle_layout');