Денис не так давно отвечал мне на вопрос, суть такова:
Если шаблон назвать так же как псевдоним всего каталога (можно увидеть в настройках). То он сам будет подключаться и тогда его не обязательно указывать в категориях.Сейчас вижу два решенияОтделить программы ипотеки в новый каталогЛибо внутри шаблона item_columns менять шапку в зависимости от искомого типа материаланапример так
<?php
/**
* JBZoo is universal CCK based Joomla! CMS and YooTheme Zoo component
* @category JBZoo
* @author smet.denis <admin@joomla-book.ru>
* @copyright Copyright (c) 2009-2012, Joomla-book.ru
* @license [url=http://joomla-book.ru/info/disclaimer]http://joomla-book.ru/info/disclaimer[/url]
* @link [url=http://joomla-book.ru/projects/jbzoo]http://joomla-book.ru/projects/jbzoo[/url] JBZoo project page
*/
defined('_JEXEC') or die('Restricted access');
if (JRequest::getVar('type') == 'ipotechnaya-programma') {
$this->app->jbassets->tablesorter();
if ($vars['count']) : ?>
<table class="jsTableSorter tablesorter">
<thead>
<tr>
<th>Программа</th>
<th>Банк</th>
<th>Срок кредитования, лет</th>
<th>Сумма кредита, тыс. руб</th>
<th>Ставка до ОПС max, %</th>
<th>Ставка после ОПС max, %</th>
<th>Первоначальный взнос от, %</th>
</tr>
</thead>
<tbody>
<?php
foreach ($vars['objects'] as $object) :
echo $object;
endforeach;
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(function ($) {
$('.jsTableSorter').tablesorter({});
});
</script>
<?php endif;
} else {
$this->app->jbassets->tablesorter();
if ($vars['count']) : ?>
<table class="jsTableSorter tablesorter">
<thead>
<tr>
<th style="width:110px;">Фото</th>
<th>Адрес</th>
<th>Район</th>
<th>Сдача</th>
<th>Застройщик</th>
<th>Материал</th>
<th>Метро</th>
</tr>
</thead>
<tbody>
<?php
foreach ($vars['objects'] as $object) :
echo $object;
endforeach;
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(function ($) {
$('.jsTableSorter').tablesorter({});
});
</script>
<?php endif;
}
Извиняюсь за флуд, вопрос не обязательно к разработчикам, может кто знающий php подскажет, как должно выглядеть, если условий несколько, я очень не силен в этом
<?php
/**
* JBZoo is universal CCK based Joomla! CMS and YooTheme Zoo component
* @category JBZoo
* @author smet.denis <admin@joomla-book.ru>
* @copyright Copyright (c) 2009-2012, Joomla-book.ru
* @license [url=http://joomla-book.ru/info/disclaimer]http://joomla-book.ru/info/disclaimer[/url]
* @link [url=http://joomla-book.ru/projects/jbzoo]http://joomla-book.ru/projects/jbzoo[/url] JBZoo project page
*/
defined('_JEXEC') or die('Restricted access');
if (JRequest::getVar('type') == 'ipotechnaya-programma') {
$this->app->jbassets->tablesorter();
if ($vars['count']) : ?>
<table class="jsTableSorter tablesorter">
<thead>
<tr>
<th>Программа</th>
<th>Банк</th>
<th>Срок кредитования, лет</th>
<th>Сумма кредита, тыс. руб</th>
<th>Ставка до ОПС max, %</th>
<th>Ставка после ОПС max, %</th>
<th>Первоначальный взнос от, %</th>
</tr>
</thead>
<tbody>
<?php
foreach ($vars['objects'] as $object) :
echo $object;
endforeach;
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(function ($) {
$('.jsTableSorter').tablesorter({});
});
</script>
<?php endif;
if (JRequest::getVar('type') == 'novostrojki-predl') {
$this->app->jbassets->tablesorter();
if ($vars['count']) : ?>
<table class="jsTableSorter tablesorter">
<thead>
<tr>
<th>Фото</th>
<th>Адрес</th>
<th>Район</th>
<th>Сдача</th>
<th>Застройщик</th>
<th>Материал</th>
<th>Метро</th>
</tr>
</thead>
<tbody>
<?php
foreach ($vars['objects'] as $object) :
echo $object;
endforeach;
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(function ($) {
$('.jsTableSorter').tablesorter({});
});
</script>
<?php endif;
} else {
$this->app->jbassets->tablesorter();
if ($vars['count']) : ?>
<table class="jsTableSorter tablesorter">
<thead>
<tr>
<th style="width:110px;">Фото</th>
<th>Адрес</th>
<th>Район</th>
<th>Сдача</th>
<th>Застройщик</th>
<th>Материал</th>
<th>Метро</th>
</tr>
</thead>
<tbody>
<?php
foreach ($vars['objects'] as $object) :
echo $object;
endforeach;
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(function ($) {
$('.jsTableSorter').tablesorter({});
});
</script>
<?php endif;
}