Hello,

I've got an issue with $content in nnode.tpl.php. I've created lots of page (normal page) and all are corrects: http://www.eatsotheycan.org/node/8. But I created one new content type using CCK and there is an extra "/div" in the code: http://www.eatsotheycan.org/node/348.

Here is the node.tpl.php code:

  <div class="content">
    <?php print $content; ?>
  </div> <!-- /.content -->

Here is my page source code:

<div class="content">
  </div>
  <p><img title="Women Empowerment" src="/sites/default/files/images/womenempowerment.jpg" alt="Women Empowerment" width="400" height="267" /></p>
  <p>Help us as we work to give women an opportunity to have a brighter future for themselves and their families. Your funds will be used to support projects that empower women through running workshops and making resources available.</p>
</div> <!-- /.content -->

Where is added this extra

? Or where is created the $content? Why only in the node created using a new content type?

Thank you for your help,
Julie

Comments

nevets’s picture

What does the source html look like for node 348?

Is is just a title and body or does it have CCK fields added?

Does the content type "Donation Target" have its own node.tpl.php file?

julie.metivier’s picture

Hi nevets,

Thank you for your help.

Here is the source for node/348:

<p><img title="Women Empowerment" src="/sites/default/files/images/womenempowerment.jpg" alt="Women Empowerment" width="400" height="267" /></p>
<p>Help us as we work to give women an opportunity to have a brighter future for themselves and their families. Your funds will be used to support projects that empower women through running workshops and making resources available.</p>

There is just title and body, no other field added.

I've created this content type using the administration menu: create new content. I didn't change anything in the node.tpl.php (furnished by the theme Zen). This template seems to be correct: all the "div" are surrounded by "if" and "endif".

Thank you,
Julie