Joomla - Migrating from 1.5 to 2.5 - <jdoc:include type="component" /> not rendering content in revised 2.5 template

StackOverflow https://stackoverflow.com/questions/15122687

Question

We are migrating (migraining I should say) from 1.5 to 2.5 and our revised template from 1.5 is working, except it won't display any content when using . Please help!

Here is the code:

  <body>
    <div id="container">
      <div id="header"> <a href="<?php echo $this->baseurl ?>/home.html"><img src="images/stories/blank.gif" width="180" height="93" border="0" alt="Home"></a>
        <div id="hdnav">
          <jdoc:include type="modules" name="headnav" style="none" />
        </div>
      </div>
      <div style="clear:both;"></div>
      <div id="navigation">
        <div id="topnav">
          <jdoc:include type="modules" name="topnav" style="none" />
        </div>
      </div>
      <div style="clear:both;"></div>
      <div id="content">
        <div id="maincontent">
          <jdoc:include type="message" />
          <jdoc:include type="component" />
        </div>
        <?php if($this->countModules('right')) : ?>
        <div id="rightcol">
          <jdoc:include type="modules" name="right" style="xhtml" />
        </div>
        <?php endif; ?>
      </div>
      <div id="footer">
        <jdoc:include type="modules" name="footer" style="none" />
      </div>
    </div>
    <jdoc:include type="modules" name="debug" />
    </body>
   </html>
Was it helpful?

Solution

  1. styles

Please take the time to write new css for the divs. Tables are ancient and break easily and are a total nightmare on mobile devices.

  1. overrides

If you do 1. you won't need them. Anyhow they're really easy.

A template override is simply a component or module view template which is copied under the your template's html subfolder (in a slightly different folder structure) and Joomla will use those instead of the original files.
So for example if you want to override article view, which is in

/components/com_content/views/article/tmpl/

its override would be placed in

/templates/your_template/html/com_content/article

One small catch: Make sure you always copy the whole tmpl folder of components, you must override all layouts inside the template.

You can find more info on http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top