What is the proper way to use custom parameters?

More
12 years 7 months ago #24327 by gruz
Is there any specific way to use custom parameters in a module template?
[img



Now I can get them in my module template like this
Code:
echo $params->get('custom1',1);

Is there any specific convention?

Now I see the way to just get the parameter as string, parse and consider what to do. Not a problem surely, just want to know if a more "legal" way exists.

P.S.
I.e. I have such parameters in Parameter 1:
Code:
showimage=1 nokuu=22 name=Peter
[img


Then the best way to get the name value is to use such a code in the module template:
Code:
$tparams = new JRegistry($params->get('custom1',1)); echo $tparams->get('name');

J2.5
FC - 2.0 - Rev 1612 (since 17-00 30.12.2012)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.967 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline