I’m trying to display a home page for logged in users and a different home page for non logged in users. Up until now i’ve been using the standard homepage with the url key ‘home’ as my homepage. I’ve created a new cms page with the url key ‘home1’ which will be for non logged in users.
I’m able to output some content from the non logged in users page but if I add a table and insert images using the wysisyg then the image src is stripped when i go to view the page. It’s only displaying text at the moment, if I hard code the images its fine but i need to be able to use the wysiwyg.
Both pages are using the empty.phtml template file.
Inside this template file i have the following code
# Check if user is logged in and output the standard home page
if($this->helper('customer')->isLoggedIn()) {
echo $this->getChildHtml('content');
}
else
{
# Load cms page for non logged in users then output the content
$model = Mage::getModel('cms/page')->load('home1','identifier');
echo $model->getContent();
}
there’s probably a much better way of doing this so if anybody knows it then I’d appreciate your input.
Thank you
Try to show the both content from Magento Static Blocks instead using two cms pages.