Simplify News Tag with UDT

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
davidjon
Forum Members
Forum Members
Posts: 21
Joined: Thu Jul 09, 2009 7:56 pm

Simplify News Tag with UDT

Post by davidjon »

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.

Code: Select all

{news action="browsecat" category="Activiteiten | Basis Onderwijs | Muziek" sortby="random" detailpage="bo-detail"}
But i'd rather have something like

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\'}');
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.
Post Reply

Return to “Modules/Add-Ons”