[Solved] Page var to module

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
musicscore
Power Poster
Power Poster
Posts: 477
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

[Solved] Page var to module

Post 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.
Last edited by musicscore on Sat Feb 04, 2012 9:13 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Page var to module

Post 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
musicscore
Power Poster
Power Poster
Posts: 477
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

Re: Page var to module

Post by musicscore »

Jos,

Many thanks. I got it to work.
Post Reply

Return to “Developers Discussion”