Calling a User Defined Tag from another one

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
jsmonzani
Forum Members
Forum Members
Posts: 54
Joined: Mon Apr 03, 2006 10:58 am

Calling a User Defined Tag from another one

Post by jsmonzani »

Hello,

I love developing User Defined Tags and I'm wondering: is there a way to call a User Defined Tag (and pass parameters to it) within another one? Or to call smarty within a USD?

Thank you very much for your help!

Cheers

JS
An approach to mutli-lingual CMSMS using only content blocks:
http://forum.cmsmadesimple.org/index.ph ... 756.0.html
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Calling a User Defined Tag from another one

Post by RonnyK »

USD?

I found this topic on smarty in UDT.

http://forum.cmsmadesimple.org/index.ph ... l#msg60579

Ronny
jsmonzani
Forum Members
Forum Members
Posts: 54
Joined: Mon Apr 03, 2006 10:58 am

Re: Calling a User Defined Tag from another one

Post by jsmonzani »

Thank you Ronny, this surely helps!

I don't think that this really shows how to pass parameters, though, but I'll give it a try :)

Say if you have something like:

{myusd  param="42"}

how would this translate to PHP code? :)
An approach to mutli-lingual CMSMS using only content blocks:
http://forum.cmsmadesimple.org/index.ph ... 756.0.html
jsmonzani
Forum Members
Forum Members
Posts: 54
Joined: Mon Apr 03, 2006 10:58 am

Re: Calling a User Defined Tag from another one

Post by jsmonzani »

Hm couldn't find this out. I'm sure somebody has already done it ;)
An approach to mutli-lingual CMSMS using only content blocks:
http://forum.cmsmadesimple.org/index.ph ... 756.0.html
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm
Location: Marlow, UK

Re: Calling a User Defined Tag from another one

Post by scooper »

You can call a UDT from inside another UDT using CallUserTag()

For example .... to pass the hat style of the day to my handy UDT 'hats' I would do:

Code: Select all


global $gCms;

$params['style']="boater";

$tagOps = $gCms->GetUserTagOperations();
$tagOps->CallUserTag("hats",$params);

s.
Post Reply

Return to “Developers Discussion”