Reputation: 72
I am creating a website which is running multiple templates. The default template has no issues but the other assigned templates are giving problems.
1) The internal templates are not calling the required asset files for components/modules/plugins. I am inserting the css and js files manually.
2) codes to show only some components on its home page or others in internal pages are not working in non default templates. Example code :
<?php if($this->countModules('travelnhomepagecheck')) { ?>
<jdoc:include type="modules" name="travel_segment_threeimagerotator" style="xhtml" />
<br />
<jdoc:include type="component" />
<?php } else { ?>
<table width="100%" border="0" cellpadding="2">
<tr>
<td width="65%" style="vertical-align:top;">
<jdoc:include type="component" />
</td>
<td width="33%" style="vertical-align:top;">
<jdoc:include type="modules" name="travel_segment_rightCol" style="xhtml" />
</td>
</tr>
</table>
<?php } ?>
It only shows elements of the template's home page and not internal pages. Would appreciate any help in the right direction.
Upvotes: 1
Views: 159
Reputation:
You're problem is that the asset files not beeing loaded? Maybe the other templates generating the HTML HEAD by a custom function and did not use the Joomla!-Head-Include-function.
Just look forward to a line in your templates like this:
<jdoc:include type="head" />
This includes all the Meta Data, assets like css/js and so on. basically it imports the whole Joomla!HTML head. But some templates do that manually and then recently installed plugin-files wont be added automatically to the head-section.
Upvotes: 1