CatTemplateSwitcher

CatTemplateSwitcher this is plugin for adds visitors the opportunity to switch the display mode (templates) category

#1. Description

If you have intrnet shop site with Cotonti then using this plugin you can implement all the known function, the switchover of display products, such as "tiles", "line by line", etc.

#2. Installation

For install the plugin download him and in the plugins directory extract cattemplateswitcher folder from the downloaded archive.

Next, go to the admin panel of your site to install the plugin and then go to its configuration page. In the plugin settings to specify a comma-separated list of modes.

Note: Do not delete mode "default" - without it will not be possible to reset the mode of the standard

Next, insert tag {LIST_TPL_SWITCHER} in yours tpl files page.list and other

#3. Usage

#3.1. Examples config mode settings

If inputted mode - default, table, line will mean that, for example, the user will be able to switch between templates

page.list.tpl (default mode), page.list.table.tpl (table mode), page.list.line.tpl (linear mode) 

or

page.list.shop.tpl (default mode), page.list.table.shop.tpl (table mode), page.list.line.shop.tpl (linear mode) where the shop this is category code

#3.2. Tune mode switcher

If you need you can tune mode switcher in /cattemplateswitcher/tpl/cattemplateswitcher.switcher.tpl

#4. Feedback

Report errors or make suggestions to improve this plugin you can in a repo on GitHub


1. Kort  2013-11-05 10:00

А чем хуже решение через jQuery? К нему и куки можно.

2. esclkm  2013-11-05 11:15

а как для отдельных категорий этое чудо прикрутить?

 

Кстати, Паша, Молодец! реально молодец.

3. Dayver  2013-11-05 12:39

> А чем хуже решение через jQuery? К нему и куки можно.

А кто сказал что хуже? Просто плуг оплачен заказчиком и было в Т3 требование реализации переключения именно шаблонов (на это были свои причины) вот и все. Заказчик дал добро на публикацию.

 

> а как для отдельных категорий этое чудо прикрутить?

В примере указана конфигурация и то как нужно обзывать шаблоны в общем случае и в случае конкретной категории - если режим по умолчанию то берет стандартные page.list.tpl, page.list.shop.tpl, page.list.код_категории.tpl, и т.п. ... а если выбран режим например line то будет брать шаблоны page.list.line.tpl, page.list.line.shop.tpl, page.list.line.код_категории.tpl

4. Oughtem  2015-01-15 07:24

забыли добавить, что тот блок, который будет обновляться переключатором должен иметь  id="switch"
 

Only registered users can post new comments