Page 1 of 1

Making a plugin

Posted: Sun Jul 17, 2011 3:45 pm
by Oprichnik
Hi guys, i'm trying to make a very simple module with cmsms but i'm wondering how the cms works because my first experience is very bad :

Does the desginer have to ask the programmer every time he wants to access to a lang var ? I mean the lang var must be set in the smarty vars to be available in the template ?

Each intern link that the designer wants to make must be "sended" from the programmer with the CreateLink function ?

Thanks

Re: Making a plugin

Posted: Sun Jul 17, 2011 7:29 pm
by Wishbone
You can give the designer access to all your variables.. In your module, do:

Code: Select all

$smarty->assign('module', $this);
..and in your template:

Code: Select all

{$module->Lang('whatever')}
..as long as you're OK with your designer being able to access any function associated with your module.