I have a custom controller accessed at the path /custommodule/customer/info
which is loading the 2columns-left.phtml
template on the root
node as follows:
<custommodule_customer_info>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
</custommodule_customer_info>
What I would like to do is update the root template for customers who are not logged in, something such as:
<customer_logged_out>
<custommodule_customer_info>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</custommodule_customer_info>
</customer_logged_out>
I understand that I can't target multiple layout handles in this fashion, but the intent should be clear; update the root template for this layout handle while customers are not logged in.
I had thought that I could target my controller's handle with the following:
<customer_logged_out>
<reference name="custommodule_customer_info">
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</reference>
</customer_logged_out>
This indeed does update the root template with the 1column.phtml
template, but it is doing so on what appears to be all pages instead of just the page targeted in my reference
node.
I have tried several permutations of this layout update, but none seem to work. How can I target this one layout handle while at the same time using the customer_logged_out
layout handle?
-- edit -- To be clear, this is actually a third-party module.