title: Displaying a cms page from within a template file
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>Both pages are using the empty.phtml template file.</p>
  
  <p>Inside this template file i have the following code</p>
  
  <pre><code>    # Check if user is logged in and output the standard home page
      if($this-&gt;helper('customer')-&gt;isLoggedIn()) {
         echo $this-&gt;getChildHtml('content');
      }
      else
      {
         # Load cms page for non logged in users then output the content
         $model = Mage::getModel('cms/page')-&gt;load('home1','identifier');
          echo $model-&gt;getContent();
      }
  </code></pre>
  
  <p>there's probably a much better way of doing this so if anybody knows it then I'd appreciate your input.</p>
  
  <p>Thank you </p>