Jump to content

Multi Layout


Recommended Posts

gunakan if else statement berdasarkan variabel ID Kategori untuk membedakan style CSS tiap kategori, atau untuk membedakan file themes yang akan di tampilkan

misalnya :

Pada file product-list.tpl

>
</pre>
<ul>
        ... ... ...
        ... ... ...




atau, pada category.tpl

{if $smarty.get.id_category == 2}
{include file=$tpl_dir./product-list-2.tpl products=$products}
{elseif $smarty.get.id_category == 3}
{include file=$tpl_dir./product-list-3.tpl products=$products}
{else}
{include file=$tpl_dir./product-list.tpl products=$products}
{/if}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...