news browsecat by $node.PARAM
Posted: Mon Sep 19, 2016 9:02 am
Hey,
i`m manipulating the news module at the moment (filter- and sortfunctions will follow) and this easy trick helps to filter by the $node. values:
Just make a simple browsecat template {browsecat-test} and add an if-condition:
and call it within your page.
Hope that helps anybody ,mfg
i`m manipulating the news module at the moment (filter- and sortfunctions will follow) and this easy trick helps to filter by the $node. values:
Code: Select all
.news_category_id (string) = 1
.news_category_name (string) = General
.parent_id (string) = -1
.hierarchy (string) = 00001
.item_order (string) = 1
.long_name (string) = General
.create_date (string) = 10:59:45
.modified_date (string) = 10:59:45
.index (integer) = 0
.count (integer) = 0
.prevdepth (integer) = 1
.depth (integer) = 1
.url (string) = http://xxx.de
Code: Select all
{foreach from=$cats item=node}
{if $node.parent_id == 4}
<p><a href="{$node.url}" title="{$entry->title}">{$node.news_category_name}</a></p>
{/if}
{/foreach}
Code: Select all
{news action="browsecat" browsecattemplate="browsecat-test"}
Hope that helps anybody ,mfg