user2742008
user2742008

Reputation: 11

<jdoc:include type="component" /> displaying home

I am building my first joomla site I am stuck here- when I am including at my templates index.php.

<jdoc:include type="component" />

It is displaying Home at my front end. Can't find the solution need help.

Upvotes: 0

Views: 4428

Answers (1)

Yash
Yash

Reputation: 347

Create a Custom Html module frontcomp and display it only on home page without writing any thing in it. then add the following in index.php(template)

<?php if($this->countModules('frontcomp')) : ?>
<jdoc:include type="modules" name="frontcomp" style="xhtml" />
<?php endif; ?>
<?php if(!$this->countModules('frontcomp')) : ?>
<jdoc:include type="message" />
<jdoc:include type="component" />
<?php endif; ?>

Upvotes: 1

Related Questions