Simplify News Tag with UDT
Posted: Sat Dec 05, 2009 8:20 pm
Hi Guys,
I was wondering....i want to simplify the News Tag for my clients....is this possible? I bet it is....
This is what it looks like right now.
But i'd rather have something like
I searched the web a bit, but i'm not really a developer, so i cant really find out how to make it. This is what I came up with so far, but that doesnt work.
Oo, and the detailpage is variable aswell. bo should be created from the category param. So maybe it's possible to use something like a replace tag orso....
So basicaly i would like a UDT, that generates a news tag, with some basic params in it, which are changeable in the shortened tag.
I hope anyone can help me:) Anyway...thank you for taking the time to read and hopefully help
DJ.
I was wondering....i want to simplify the News Tag for my clients....is this possible? I bet it is....
This is what it looks like right now.
Code: Select all
{news action="browsecat" category="Activiteiten | Basis Onderwijs | Muziek" sortby="random" detailpage="bo-detail"}
Code: Select all
{overview category="Basis Onderwijs" activity="Muziek"}
I searched the web a bit, but i'm not really a developer, so i cant really find out how to make it. This is what I came up with so far, but that doesnt work.
Code: Select all
global $gCms;
$news = $gCms->modules['News']['object'];
return $news->ProcessTemplateFromData('{news action=\'browsecat\' category=\'Activiteiten | $params[\'category\'] | $params[\'Muziek\']\' sortby=\'random\' detailpage=\'bo-detail\'}');
So basicaly i would like a UDT, that generates a news tag, with some basic params in it, which are changeable in the shortened tag.
I hope anyone can help me:) Anyway...thank you for taking the time to read and hopefully help

DJ.