Page 1 of 1

[Solved] Page var to module

Posted: Sat Feb 04, 2012 10:14 am
by musicscore
Write my first module.
I'm looking for a couple of days now but cannot find the answer.
How can i get var to my modulescript ?

Example :

On my page i give {modulename order="1"}

How can I read the value of order in my module php script.
There is now variable $order.

Re: Page var to module

Posted: Sat Feb 04, 2012 2:33 pm
by Jos
$params['order']

Don't forget to use

Code: Select all

$this->SetParameterType('order',CLEAN_INT);
Or CLEAN_STRING in stead of CLEAN_INT

check the News module for an example of how to use this

Re: Page var to module

Posted: Sat Feb 04, 2012 9:13 pm
by musicscore
Jos,

Many thanks. I got it to work.