Jump to content

Вывод информации в зависимости от страницы


Go to solution Solved by Kors,

Recommended Posts

Всем привет!

 

Друзья, у меня в данный момент состоится верстка шаблона. Столкнулся с проблемой.

 

Дизайн респонсив, в 3 колонки. Два сайдбара (левый, правый)

В левом сайдбаре на главной странице нужно вывести одну информацию а на страницах категорий и товаров другую. 

 

Что нужно прописать?

У меня вышло показать информацию только на страницах категорий, брендов а в товаре отображает как на главной.

 

Вот таким кодом скрыл с главной, но и скрылось со страницы товаров.

{if $features || $category->brands || $features_sizes|count > 1 || $features_colors|count > 1 || $features_heights|count > 1}

...

{/if}

Как побороть? На Симпле верстаю полностью впервые :(

Link to post
Share on other sites
  • Solution

Примерно так:

{if $module=='MainView'}

Блок для главной

{elseif $module=='ProductsView' || $module=='ProductView'}

Блок на страницах категорий и товаров


{else}

Блок на прочих

{/if}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...