Hi All,

Current install:
CakePHP Ver 1.3.14
PHP Ver 5.3.8

I hope somebody can help. My current view (indicated below) is
duplicating the HTML code when initializing the view file. I am
currently using a layout file, but still get the HTML duplication
irrespective of the template used. I have been pulling my hair out
with this and any help would be appreciated.

Thanks in advance,

Craig

view.ctp

<?php
        $items = $MenuItem;
        $this->pageTitle = $items['MenuItem']['title'];
        $url = (empty($items['MenuItem']['controller']) ? '' : '/'.
$items['MenuItem']['controller'])
                          .(empty($items['MenuItem']['action']) ? "" : '/'.
$items['MenuItem']['action'])
                          .'/'.$items['MenuItem']['args'];
        echo $this->requestAction($url, array('bare'=>false , 'layout'=> '/
templates/business/default.ctp',  'return'));
?>

/templates/business/default.ctp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
        <?php echo $html->css(array('/templates/business/
bluebusiness', 'system')); ?>
        <?php echo $html->charset(); ?>
        <title>
                <?php echo $title_for_layout; ?>
        </title>

        <?php echo $html->meta( 'keywords', null, array('content'=>
$site_keywords)) ?>
        <?php echo $html->meta( 'description', null, array('content'=>
$site_description)) ?>
        <?php echo $html->meta( 'author', null, array('name'=>'author',
'content'=> $site_author)) ?>
        <?php echo $html->meta( 'generator', null, array('name'=>'generator',
'content'=> __('Public Instinct', true))) ?>

        <?php
                echo $html->meta('icon');
                echo $scripts_for_layout;
                echo $html->script('toolbar/generic');
                echo $html->script('listings/generic');
        ?>
</head>
<body>

 <div id="container-header">
    <div id="container-name"><?php echo $this->Html->image('/templates/
business/images/cloudware.png', array('url' => '/')); ?></div>
    <div id="container-slogan"><span>&quot;</span>revolutionizing the
desktop environment<span>&quot;</span></div>
  </div>
  <div id="container-eyecatcher">
    <div id="container-navigation">
      <?php echo $this->element('menu_ul') ?>
    </div>
    <?php echo $html->image('/templates/business/images/
business_eyecatcher.jpg') ?></div> -->
  <div id="container-content">
      <?php $msg = $session->check('Message.flash'); if(!
empty($msg)): ?>
                <div id="msg">
                        <?php $session->flash() ?>
                </div>
          <?php endif; ?>
        <div id="content">
          <div id="toolbar"><?php echo $this->element('toolbar'); ?></div>


    </div>
    <!-- CONTENT END -->
  <div id="border">
      <h4><?php __('Customer Login') ?></h4>
      <?php echo $this->element('login') ?>
      <hr />
      <h4><?php __('Latest Software') ?></h4>
      <?php echo $this->element('latest_apps') ?>
      <hr />
      <h4>Contact Us</h4>
      <p>Public Instinct<br />
        4223 Grand National Boulevard<br />
        7441 Cape Town <br />
        <br />
        Phone: +27 21 555 4849 <br />
        Fax: +27 21 555 4849 <br />
        E-Mail: <a
href="mailto:[email protected]";>[email protected]</a> </p>
    </div>
  </div>
  <div id="container-footer">
    <div id="footer">
      <div id="footer-copyright">&copy; 2009 OpenTop Services - all
rights reserved.</div>
      <div id="footer-meta"><a target="_blank" href="http://
validator.w3.org/check?uri=referer">XHTML</a> | <a target="_blank"
href="http://jigsaw.w3.org/css-validator/check/referer";>CSS</a> | <a
href="http://www.christian-pansch.de"; title="Webdesign Bremen">Design
by christian-pansch.de</a></div>
    </div>
  </div>
</div>
<!-- END container -->
  </div><div><?php echo $content_for_layout; ?></div></body>
</html>

HTMLOutput:




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>

        <link rel="stylesheet" type="text/css" href="/skynew/templates/
business/bluebusiness.css" />
        <link rel="stylesheet" type="text/css" href="/skynew/css/system.css" /
>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
                Menu Items      </title>

        <meta name="keywords" content="software as a service, cloud
computing" />   <meta name="description" content="software as a service,
cloud computing" />     <meta name="author" content="Cloudware" />      <meta
name="generator" content="Public Instinct" />
        <link href="/skynew/favicon.ico" type="image/x-icon" rel="icon" /
><link href="/skynew/favicon.ico" type="image/x-icon" rel="shortcut
icon" /><script type="text/javascript" src="/skynew/js/toolbar/
generic.js"></script><script type="text/javascript" src="/skynew/js/
listings/generic.js"></script></head>
<body>

 <div id="container-header">
    <div id="container-name"><a href="/skynew/"><img src="/skynew/
templates/business/images/cloudware.png" alt="" /></a></div>
    <div id="container-slogan"><span>&quot;</span>revolutionizing the
desktop environment<span>&quot;</span></div>
  </div>
  <div id="container-eyecatcher">
    <div id="container-navigation">
        <ul>
        <li><a href="/skynew/m/home.htm" class="active">&lt;span&gt;Home&lt;/
span&gt;</a></li><li><a href="/skynew/m/benefits.htm"
class="inactive">&lt;span&gt;Benefits&lt;/span&gt;</a></li><li><a
href="/skynew/m/available-software.htm"
class="inactive">&lt;span&gt;Available Software&lt;/span&gt;</a></
li><li><a href="/skynew/m/cloud-solutions.htm"
class="inactive">&lt;span&gt;Cloud Solutions&lt;/span&gt;</a></li></
ul>
    </div>
    <img src="/skynew/templates/business/images/
business_eyecatcher.jpg" alt="" /></div> -->
  <div id="container-content">
        <div id="content">
          <div id="toolbar"></div>


    </div>
    <!-- CONTENT END -->
  <!-- <div id="border">
      <h4>Customer Login</h4>
      <form name="loginForm" id="UserLoginForm" method="post" action="/
skynew/users/login"><fieldset style="display:none;"><input
type="hidden" name="_method" value="POST" /></fieldset><div
class="input text"><label for="UserUsername">Username</label><input
name="data[User][username]" type="text" maxlength="50"
id="UserUsername" /></div><div class="input password required"><label
for="UserPassword">Password</label><input type="password"
name="data[User][password]" id="UserPassword" /></div><input
type="hidden" name="data[User][redirect]" value="/applications/index/
myapps" id="UserRedirect" /><div class="submit"><input value="Login" /
></div></form><br><p><a href="/skynew/users/login/">Sign up. It&#039;s
free</a></p><p><a href="/skynew/users/recover/">Can&#039;t access your
account?</a></p>      <hr />
      <h4>Latest Software</h4>
      <ul id="news">
        <li><a href="/skynew/applications/view/5">SAP Business One</
a><br>added Apr 14th 2009, 12:27</li>       <li><a href="/skynew/
applications/view/4">Open Office</a><br>added Apr 14th 2009, 12:04</
li>       <li><a href="/skynew/applications/view/3">Microsoft Office
Powerpoint</a><br>added Mar 9th 2009, 21:42</li>       <li><a href="/
skynew/applications/view/2">Microsoft Office Excel</a><br>added Feb
26th 2009, 13:34</li>  </ul>
      <hr />
      <h4>Contact Us</h4>
      <p>Public Instinct<br />
        4223 Grand National Boulevard<br />
        7441 Cape Town <br />
        <br />
        Phone: +27 21 555 4849 <br />
        Fax: +27 21 555 4849 <br />
        E-Mail: <a
href="mailto:[email protected]";>[email protected]</a> </p>
    </div>
  </div>
  <div id="container-footer">
    <div id="footer">
      <div id="footer-copyright">&copy; 2009 OpenTop Services - all
rights reserved.</div>
      <div id="footer-meta"><a target="_blank" href="http://
validator.w3.org/check?uri=referer">XHTML</a> | <a target="_blank"
href="http://jigsaw.w3.org/css-validator/check/referer";>CSS</a> | <a
href="http://www.christian-pansch.de"; title="Webdesign Bremen">Design
by christian-pansch.de</a></div>
    </div>
  </div>
</div> -->
<!-- ENDE container -->
  </div><div><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>

        <link rel="stylesheet" type="text/css" href="/skynew/templates/
business/bluebusiness.css" />
        <link rel="stylesheet" type="text/css" href="/skynew/css/system.css" /
>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
                Contents        </title>

        <meta name="keywords" content="software as a service, cloud
computing" />   <meta name="description" content="software as a service,
cloud computing" />     <meta name="author" content="Cloudware" />      <meta
name="generator" content="Public Instinct" />
        <link href="/skynew/favicon.ico" type="image/x-icon" rel="icon" /
><link href="/skynew/favicon.ico" type="image/x-icon" rel="shortcut
icon" /><script type="text/javascript" src="/skynew/js/toolbar/
generic.js"></script><script type="text/javascript" src="/skynew/js/
listings/generic.js"></script></head>
<body>

 <div id="container-header">
    <div id="container-name"><a href="/skynew/"><img src="/skynew/
templates/business/images/cloudware.png" alt="" /></a></div>
    <div id="container-slogan"><span>&quot;</span>revolutionizing the
desktop environment<span>&quot;</span></div>
  </div>
  <div id="container-eyecatcher">
    <div id="container-navigation">
        <ul>
        <li><a href="/skynew/m/home.htm" class="active">&lt;span&gt;Home&lt;/
span&gt;</a></li><li><a href="/skynew/m/benefits.htm"
class="inactive">&lt;span&gt;Benefits&lt;/span&gt;</a></li><li><a
href="/skynew/m/available-software.htm"
class="inactive">&lt;span&gt;Available Software&lt;/span&gt;</a></
li><li><a href="/skynew/m/cloud-solutions.htm"
class="inactive">&lt;span&gt;Cloud Solutions&lt;/span&gt;</a></li></
ul>
    </div>
    <img src="/skynew/templates/business/images/
business_eyecatcher.jpg" alt="" /></div> -->
  <div id="container-content">
        <div id="content">
          <div id="toolbar"><div class="toolbar">
<h1>About Cloudware</h1>
</div></div>


    </div>
    <!-- CONTENT END -->
  <!-- <div id="border">
      <h4>Customer Login</h4>
      <form name="loginForm" id="UserLoginForm" method="post" action="/
skynew/users/login"><fieldset style="display:none;"><input
type="hidden" name="_method" value="POST" /></fieldset><div
class="input text"><label for="UserUsername">Username</label><input
name="data[User][username]" type="text" maxlength="50"
id="UserUsername" /></div><div class="input password required"><label
for="UserPassword">Password</label><input type="password"
name="data[User][password]" id="UserPassword" /></div><input
type="hidden" name="data[User][redirect]" value="/applications/index/
myapps" id="UserRedirect" /><div class="submit"><input value="Login" /
></div></form><br><p><a href="/skynew/users/login/">Sign up. It&#039;s
free</a></p><p><a href="/skynew/users/recover/">Can&#039;t access your
account?</a></p>      <hr />
      <h4>Latest Software</h4>
      <ul id="news">
        <li><a href="/skynew/applications/view/5">SAP Business One</
a><br>added Apr 14th 2009, 12:27</li>       <li><a href="/skynew/
applications/view/4">Open Office</a><br>added Apr 14th 2009, 12:04</
li>       <li><a href="/skynew/applications/view/3">Microsoft Office
Powerpoint</a><br>added Mar 9th 2009, 21:42</li>       <li><a href="/
skynew/applications/view/2">Microsoft Office Excel</a><br>added Feb
26th 2009, 13:34</li>  </ul>
      <hr />
      <h4>Contact Us</h4>
      <p>Public Instinct<br />
        4223 Grand National Boulevard<br />
        7441 Cape Town <br />
        <br />
        Phone: +27 21 555 4849 <br />
        Fax: +27 21 555 4849 <br />
        E-Mail: <a
href="mailto:[email protected]";>[email protected]</a> </p>
    </div>
  </div>
  <div id="container-footer">
    <div id="footer">
      <div id="footer-copyright">&copy; 2009 OpenTop Services - all
rights reserved.</div>
      <div id="footer-meta"><a target="_blank" href="http://
validator.w3.org/check?uri=referer">XHTML</a> | <a target="_blank"
href="http://jigsaw.w3.org/css-validator/check/referer";>CSS</a> | <a
href="http://www.christian-pansch.de"; title="Webdesign Bremen">Design
by christian-pansch.de</a></div>
    </div>
  </div>
</div> -->
<!-- ENDE container -->
  </div><div><div id="contents_content">
        <div class="introtext">
                        </div>
        <div class="fulltext">
                <h2>Vision</h2>
<p>OpenTop strives to be the leading provider of VDI solutions across
organizations around the world. The company is driven by its passion,
powered by its technical competence, complemented by its technology
partnerships and fueled by the realization of the copious benefits
that virtualisation provides.</p>
<h2>Demystify VDI</h2>
<p>OpenTop Services is the product of years of experience, research
and innovative development that stems from an in-depth understanding
of the benefits realisable from virtualisation.</p>
<p>OpenTop Services VDI solutions broaden current server
virtualisation trends to incorporate the desktop environment further
simplifying data management and IT infrastructure.</p>
<h2>Devotion</h2>
<p>The company's belief in Open Source solutions advances
organizations computing power beyond software limitations, while
honoring investments in current, legacy and homegrown applications.
The company offers world-first solutions that offer clients the choice
of proprietary applications and Open Source applications on the same
display - the backbone of the company's growing success.</p>
<h2>Dedication</h2>
<p>Whilst strongly believing in Open Source solutions OpenTop is 100%
dedicated to the concept of legacy applications and will always
support all applications on all platforms.</p>
<p>&nbsp;</p>   </div>
</div>
</div></body>
</html>
</div></body>
</html>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to