Use GET Parameters in UDT

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
jonnieb
Forum Members
Forum Members
Posts: 16
Joined: Thu Sep 11, 2008 10:32 pm

Use GET Parameters in UDT

Post by jonnieb »

Hi!

I would like to use the GET parameters out of the URL in an UDT. E.g. I have

index.php?mact=produktverwaltung,cntnt01,default,0&cntnt01what=produkt&cntnt01parent=Fernseher&cntnt01returnid=53&hl=en_US

How can i get the Parameter cntnt01parent?

Best,
JonnieB
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: Use GET Parameters in UDT

Post by Dee »

The global $_GET variable is available in your UDT, so

Code: Select all

$_GET['cntnt01parent']

Normally, if you need such a value in your template, the module should assign it to Smarty and you should use the Smarty variable in your template or UDT.


Kind regards,
D
Last edited by Anonymous on Wed Jul 15, 2009 11:54 am, edited 1 time in total.
Post Reply

Return to “Developers Discussion”