Subcategories

Plugin which outputs pages from subcategories in parent categories

This plugin outputs pages from nested categories in list.group.tpl.

 

How to set it up:

In plugin configuration you need to specify which categories should output their pages when listing. Pages from nested categories will be printed too.

For example, if you have such structure:

articles
-- art1
-- art2
-- art3
-- art31
-- art32
-- art4
-- art5

If you want list.php?c=articles to display pages from art1, art3, art4 write them in plugin settings: art1, art3, art4. This will output pages from art1, art3, art4, art31 and art32.

In list.tpl you need to add a new block <!-- BEGIN: SUBCAT_PAGES --> as it is done in example list.tpl in the package.

All tags from normal list.tpl are supported, including extrafields. You can find the tags at the bottom of subcats/subcats.list.rowcat.loop.php. Their names are identical to standard tags from list.tpl but the prefix "SC_" is added to them.

Page sorting order can be specified in plugin settings or the default category order will be used. In the above example order setting of articles will be used.

As you can see this plugin can:

1. select which categories to output and which categories to skip (with checkboxes in admin tool)

2. limit the number of pages in the list.

3. choose soring method by selected fields.

Russian:

Как настроить:

В настройках плагина нужно указать категории, при выводе которых в list.php нужно вывести их страницы. Страницы будут выведены также со всех вложенных категорий.

Например, имеем структуру:

articles
-- art1
-- art2
-- art3
-- art31
-- art32
-- art4
-- art5

Нам нужно в list.php?c=articles при выводе категорий art1, art3, art4 отобразить их страницы. В настройках так и пишем: art1, art3, art4

будут выведены страницы из категорий art1, art3, art4 и art31 art32 т.к. последние вложены в указанный в настройках art3.

В list.tpl нужно добавить блок <!-- BEGIN: SUBCAT_PAGES --> как сделано в прилагаемом list.tpl

Поддерживаются все теги, которые есть в обычном list.tpl, включая все экстраполя. Теги можно посмотреть в файле subcats/subcats.list.rowcat.loop.php внизу. Их названия для удобства идентичны со стандартными в list.tpl с добавлением префикса "SC_"

сортировка может быть указана в плагине или использоваться указанная по умолчанию в настройках категории. В примере выше по-умолчанию будет использована настройка для articles.

Как вы уже поняли плагин может:

1. выбрать для каких категорий выводить, а для каких нет (желательно в админке галочками)

2. возможность ограничить количество выводящихся страниц.

3. выбрать метод сортировки по выбранным полям

Обсуждение тут.


No comments yet
Only registered users can post new comments