Александр 0 Posted February 14, 2014 Report Share Posted February 14, 2014 в шаблоне index.html делаем примерно так: {config_load file="$language/lang_$language.conf" section="index"} {include file="`$smarty.const.DIR_FS_CATALOG``$tpl_path`inc/header.tpl"} {php} if ($GET_['cat'] !=0) { {/php} <div id="wrap"> {php} } else { {/php} <div id="cleanwrap"> {php} } {/php} <div id="content"> {$main_content} </div> </div> {include file="`$smarty.const.DIR_FS_CATALOG``$tpl_path`inc/footer.tpl"} Это заинклюдили шапку, подвал, а в середине у нас класс для мест, где есть категории в $GET_ присваивается индивидуально. Пофантазировав можно довольно гибко настроить через css и такие условия вывод любой страницы. Если кто знает как обойтись без {php} - приведите пример. Quote Link to post Share on other sites
support 446 Posted February 14, 2014 Report Share Posted February 14, 2014 get массив доступен из смарта вот так: {if $smarty.get.cat != 0} Quote Link to post Share on other sites
Александр 0 Posted February 14, 2014 Author Report Share Posted February 14, 2014 да, уже нашёл, как раз хотел дописать тут: {config_load file="$language/lang_$language.conf" section="index"} {include file="`$smarty.const.DIR_FS_CATALOG``$tpl_path`inc/header.tpl"} {if $smarty.get.cat != 0} <div id="cleanwrap"> {else} <div id="wrap"> {/if} <div id="content"> {$main_content} </div> </div> {include file="`$smarty.const.DIR_FS_CATALOG``$tpl_path`inc/footer.tpl"} благодарю за оперативность. Quote Link to post Share on other sites
support 446 Posted February 14, 2014 Report Share Posted February 14, 2014 Тогда уж и первое сообщение поправьте. :dad: Quote Link to post Share on other sites
Александр 0 Posted February 16, 2014 Author Report Share Posted February 16, 2014 пусть останется для истории Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.