В Joomla на одной странице может использоваться только один шаблон
Да ладно?
а как же функция loadTemplate()?
Взять, к примеру, VirtueMart, шаблон для которого я сейчас делаю. Вот кусок кода страницы с корзиной. Загружаются три шаблона.
<div id="cart-view" class="cart-view">
<?php $uri = vmUri::getCurrentUrlBy('get');
$uri = str_replace(array('?tmpl=component', '&tmpl=component'), '', $uri);
echo shopFunctionsF::getLoginForm ($this->cart, FALSE,$uri);
// This displays the form to change the current shopper
if ($this->allowChangeShopper and !$this->isPdf){
echo $this->loadTemplate('shopperform'); // Шаблон раз
}
$taskRoute = ''; ?>
<form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart' . $taskRoute, $this->useXHTML, $this->useSSL); ?>">
<?php if(!$this->isPdf and VmConfig::get('multixcart') == 'byselection') {
echo shopFunctions::renderVendorFullVendorList($this->cart->vendorId); ?>
<input type="submit" name="updatecart" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" class="button" style="margin-left: 10px;"/>
<?php }
// This displays the pricelist MUST be done with tables, because it is also used for the emails
echo $this->loadTemplate('pricelist'); // Шаблон два
if (!empty($this->checkoutAdvertise)) { ?>
<div id="checkout-advertise-box">
<?php foreach ($this->checkoutAdvertise as $checkoutAdvertise) { ?>
<div class="checkout-advertise">
<?php echo $checkoutAdvertise; ?>
</div>
<?php } ?>
</div>
<?php }
echo $this->loadTemplate('cartfields'); // Шаблон три ?>
<div class="checkout-button-top">
<?php echo $this->checkout_link_html; ?>
</div>
<input type='hidden' name='order_language' value='<?php echo $this->order_language; ?>'/>
<input type='hidden' name='task' value='updatecart'/>
<input type='hidden' name='option' value='com_virtuemart'/>
<input type='hidden' name='view' value='cart'/>
</form>
</div>