JParameter with params.xml definition file
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
FRamonTB <framo... @gmail.com>
Date: Sat, 11 Aug 2012 10:37:34 -0700 (PDT)
Local: Sat, Aug 11 2012 1:37 pm
Subject: JParameter with params.xml definition file
Hello all,
I'm developing an MVC component and trying to use parameters in front-end. In one view of the component I coded:
jimport( 'joomla.html.parameter' ); $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml'; $params = new JParameter($item->params, $paramsdefs);
and it works well doing gets over the $params object. I do $params->get('value','','group'); and it returns the right value.
The problem is that the method: $params->getGroups() Always return 'false'... I don't know why...
My itemparams.xml file: <root> <params group="group"> <param type="text" name="value" size="10" label="a label:" description="a description" /> </params> </root>
Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
elin <elin.war... @gmail.com>
Date: Mon, 13 Aug 2012 17:55:31 -0700 (PDT)
Local: Mon, Aug 13 2012 8:55 pm
Subject: Re: JParameter with params.xml definition file
Is this in 1.5? Because you shouldn't be using DS and you shouldn't be using JParameter if you are in 2.5.
Elin
On Saturday, August 11, 2012 1:37:34 PM UTC-4, FRamonTB wrote:
> Hello all,
> I'm developing an MVC component and trying to use parameters in > front-end. In one view of the component I coded:
> jimport( 'joomla.html.parameter' ); > $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml'; > $params = new JParameter($item->params, $paramsdefs);
> and it works well doing gets over the $params object. I do > $params->get('value','','group'); > and it returns the right value.
> The problem is that the method: > $params->getGroups() > Always return 'false'... I don't know why...
> My itemparams.xml file: > <root> > <params group="group"> > <param type="text" name="value" size="10" label="a label:" description="a > description" /> > </params> > </root>
> Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
FRamonTB <framo... @gmail.com>
Date: Tue, 14 Aug 2012 08:12:20 -0700 (PDT)
Local: Tues, Aug 14 2012 11:12 am
Subject: Re: JParameter with params.xml definition file
Yes, It's in Joomla 2.5 and I'm using DS and JParameter... shouldn't I?
I was trying to follow this doc: http://docs.joomla.org/Component_parameters
What I should use?
Thanks for you help !!!
Regards: framontb
El martes, 14 de agosto de 2012 02:55:31 UTC+2, elin escribió:
> Is this in 1.5? Because you shouldn't be using DS and you shouldn't be > using JParameter if you are in 2.5.
> Elin
> On Saturday, August 11, 2012 1:37:34 PM UTC-4, FRamonTB wrote:
>> Hello all,
>> I'm developing an MVC component and trying to use parameters in >> front-end. In one view of the component I coded:
>> jimport( 'joomla.html.parameter' );
>> $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml';
>> $params = new JParameter($item->params, $paramsdefs);
>> and it works well doing gets over the $params object. I do >> $params->get('value','','group');
>> and it returns the right value.
>> The problem is that the method:
>> $params->getGroups()
>> Always return 'false'... I don't know why...
>> My itemparams.xml file:
>> <root>
>> <params group="group">
>> <param type="text" name="value" size="10" label="a label:" description="a >> description" />
>> </params>
>> </root>
>> Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Herman Peeren <herman.pee... @gmail.com>
Date: Tue, 14 Aug 2012 10:16:19 -0700 (PDT)
Local: Tues, Aug 14 2012 1:16 pm
Subject: Re: JParameter with params.xml definition file
Another Wiki article that needs updating: JParameter is deprecated; you should use JForm instead. DS should not be used anymore, for it has become superfluous as PHP handles slashes correctly nowadays, also on Windows.
On the other hand: deprecated means it is still available... So the question in the posting is still valid.What would the answer be?
On Tuesday, 14 August 2012 17:12:20 UTC+2, FRamonTB wrote:
> Yes, It's in Joomla 2.5 and I'm using DS and JParameter... shouldn't I?
> I was trying to follow this doc: > http://docs.joomla.org/Component_parameters
> What I should use?
> Thanks for you help !!!
> Regards: framontb
> El martes, 14 de agosto de 2012 02:55:31 UTC+2, elin escribió:
>> Is this in 1.5? Because you shouldn't be using DS and you shouldn't be >> using JParameter if you are in 2.5.
>> Elin
>> On Saturday, August 11, 2012 1:37:34 PM UTC-4, FRamonTB wrote:
>>> Hello all,
>>> I'm developing an MVC component and trying to use parameters in >>> front-end. In one view of the component I coded:
>>> jimport( 'joomla.html.parameter' );
>>> $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml';
>>> $params = new JParameter($item->params, $paramsdefs);
>>> and it works well doing gets over the $params object. I do >>> $params->get('value','','group');
>>> and it returns the right value.
>>> The problem is that the method:
>>> $params->getGroups()
>>> Always return 'false'... I don't know why...
>>> My itemparams.xml file:
>>> <root>
>>> <params group="group">
>>> <param type="text" name="value" size="10" label="a label:" >>> description="a description" />
>>> </params>
>>> </root>
>>> Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
elin <elin.war... @gmail.com>
Date: Tue, 14 Aug 2012 12:05:08 -0700 (PDT)
Local: Tues, Aug 14 2012 3:05 pm
Subject: Re: JParameter with params.xml definition file
Still available in 2.5 but won't be in 3 so really I would not use. I'm sorry I can't even remember how to use it.
Elin
On Tuesday, August 14, 2012 1:16:19 PM UTC-4, Herman Peeren wrote:
> Another Wiki article that needs updating: JParameter is deprecated; you > should use JForm instead. DS should not be used anymore, for it has become > superfluous as PHP handles slashes correctly nowadays, also on Windows.
> On the other hand: deprecated means it is still available... So the > question in the posting is still valid.What would the answer be?
> On Tuesday, 14 August 2012 17:12:20 UTC+2, FRamonTB wrote:
>> Yes, It's in Joomla 2.5 and I'm using DS and JParameter... shouldn't I?
>> I was trying to follow this doc: >> http://docs.joomla.org/Component_parameters
>> What I should use?
>> Thanks for you help !!!
>> Regards: framontb
>> El martes, 14 de agosto de 2012 02:55:31 UTC+2, elin escribió:
>>> Is this in 1.5? Because you shouldn't be using DS and you shouldn't be >>> using JParameter if you are in 2.5.
>>> Elin
>>> On Saturday, August 11, 2012 1:37:34 PM UTC-4, FRamonTB wrote:
>>>> Hello all,
>>>> I'm developing an MVC component and trying to use parameters in >>>> front-end. In one view of the component I coded:
>>>> jimport( 'joomla.html.parameter' );
>>>> $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml';
>>>> $params = new JParameter($item->params, $paramsdefs);
>>>> and it works well doing gets over the $params object. I do >>>> $params->get('value','','group');
>>>> and it returns the right value.
>>>> The problem is that the method:
>>>> $params->getGroups()
>>>> Always return 'false'... I don't know why...
>>>> My itemparams.xml file:
>>>> <root>
>>>> <params group="group">
>>>> <param type="text" name="value" size="10" label="a label:" >>>> description="a description" />
>>>> </params>
>>>> </root>
>>>> Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Herman Peeren <herman.pee... @gmail.com>
Date: Tue, 14 Aug 2012 12:23:58 -0700 (PDT)
Local: Tues, Aug 14 2012 3:23 pm
Subject: Re: JParameter with params.xml definition file
On Tuesday, 14 August 2012 21:05:08 UTC+2, elin wrote:
> Still available in 2.5 but won't be in 3 so really I would not use. I'm > sorry I can't even remember how to use it.
True and not the best practice to use deprecated stuff when making
something new, but in 2.5 it is still available and 2.5 is a Long Term *Support
*version. So although the best support might be the advice to not use it,
I´ll still give it a try:
The "default" attribute is missing in your parm. That might be the cause for the internal $_xml variable not being an array now. Try adding default="some default text" to your parm.
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
FRamonTB <framo... @gmail.com>
Date: Tue, 14 Aug 2012 12:25:25 -0700 (PDT)
Local: Tues, Aug 14 2012 3:25 pm
Subject: Re: JParameter with params.xml definition file
Thanks for your help. I will try with these doc:
http://docs.joomla.org/Creating_a_custom_form_field_type
and these:
http://www.joomla25upgrade.com/joomla-25-tutorials/35-understanding-j...
If you know another, please, let me know.
Regards: framontb
El martes, 14 de agosto de 2012 21:05:08 UTC+2, elin escribió:
> Still available in 2.5 but won't be in 3 so really I would not use. I'm > sorry I can't even remember how to use it.
> Elin
> On Tuesday, August 14, 2012 1:16:19 PM UTC-4, Herman Peeren wrote:
>> Another Wiki article that needs updating: JParameter is deprecated; you >> should use JForm instead. DS should not be used anymore, for it has become >> superfluous as PHP handles slashes correctly nowadays, also on Windows.
>> On the other hand: deprecated means it is still available... So the >> question in the posting is still valid.What would the answer be?
>> On Tuesday, 14 August 2012 17:12:20 UTC+2, FRamonTB wrote:
>>> Yes, It's in Joomla 2.5 and I'm using DS and JParameter... shouldn't I?
>>> I was trying to follow this doc: >>> http://docs.joomla.org/Component_parameters
>>> What I should use?
>>> Thanks for you help !!!
>>> Regards: framontb
>>> El martes, 14 de agosto de 2012 02:55:31 UTC+2, elin escribió:
>>>> Is this in 1.5? Because you shouldn't be using DS and you shouldn't be >>>> using JParameter if you are in 2.5.
>>>> Elin
>>>> On Saturday, August 11, 2012 1:37:34 PM UTC-4, FRamonTB wrote:
>>>>> Hello all,
>>>>> I'm developing an MVC component and trying to use parameters in >>>>> front-end. In one view of the component I coded:
>>>>> jimport( 'joomla.html.parameter' );
>>>>> $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml';
>>>>> $params = new JParameter($item->params, $paramsdefs);
>>>>> and it works well doing gets over the $params object. I do >>>>> $params->get('value','','group');
>>>>> and it returns the right value.
>>>>> The problem is that the method:
>>>>> $params->getGroups()
>>>>> Always return 'false'... I don't know why...
>>>>> My itemparams.xml file:
>>>>> <root>
>>>>> <params group="group">
>>>>> <param type="text" name="value" size="10" label="a label:" >>>>> description="a description" />
>>>>> </params>
>>>>> </root>
>>>>> Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Herman Peeren <herman.pee... @gmail.com>
Date: Tue, 14 Aug 2012 12:29:52 -0700 (PDT)
Local: Tues, Aug 14 2012 3:29 pm
Subject: Re: JParameter with params.xml definition file
http://www.ostraining.com/howtojoomla/how-tos/development/getting-sta...
On Tuesday, 14 August 2012 21:25:25 UTC+2, FRamonTB wrote:
> Thanks for your help. I will try with these doc:
> http://docs.joomla.org/Creating_a_custom_form_field_type
> and these:
> http://www.joomla25upgrade.com/joomla-25-tutorials/35-understanding-j...
> If you know another, please, let me know.
> Regards: framontb
> El martes, 14 de agosto de 2012 21:05:08 UTC+2, elin escribió:
>> Still available in 2.5 but won't be in 3 so really I would not use. I'm >> sorry I can't even remember how to use it.
>> Elin
>> On Tuesday, August 14, 2012 1:16:19 PM UTC-4, Herman Peeren wrote:
>>> Another Wiki article that needs updating: JParameter is deprecated; you >>> should use JForm instead. DS should not be used anymore, for it has become >>> superfluous as PHP handles slashes correctly nowadays, also on Windows.
>>> On the other hand: deprecated means it is still available... So the >>> question in the posting is still valid.What would the answer be?
>>> On Tuesday, 14 August 2012 17:12:20 UTC+2, FRamonTB wrote:
>>>> Yes, It's in Joomla 2.5 and I'm using DS and JParameter... shouldn't I?
>>>> I was trying to follow this doc: >>>> http://docs.joomla.org/Component_parameters
>>>> What I should use?
>>>> Thanks for you help !!!
>>>> Regards: framontb
>>>> El martes, 14 de agosto de 2012 02:55:31 UTC+2, elin escribió:
>>>>> Is this in 1.5? Because you shouldn't be using DS and you shouldn't be >>>>> using JParameter if you are in 2.5.
>>>>> Elin
>>>>> On Saturday, August 11, 2012 1:37:34 PM UTC-4, FRamonTB wrote:
>>>>>> Hello all,
>>>>>> I'm developing an MVC component and trying to use parameters in >>>>>> front-end. In one view of the component I coded:
>>>>>> jimport( 'joomla.html.parameter' );
>>>>>> $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml';
>>>>>> $params = new JParameter($item->params, $paramsdefs);
>>>>>> and it works well doing gets over the $params object. I do >>>>>> $params->get('value','','group');
>>>>>> and it returns the right value.
>>>>>> The problem is that the method:
>>>>>> $params->getGroups()
>>>>>> Always return 'false'... I don't know why...
>>>>>> My itemparams.xml file:
>>>>>> <root>
>>>>>> <params group="group">
>>>>>> <param type="text" name="value" size="10" label="a label:" >>>>>> description="a description" />
>>>>>> </params>
>>>>>> </root>
>>>>>> Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
FRamonTB <framo... @gmail.com>
Date: Tue, 14 Aug 2012 12:46:43 -0700 (PDT)
Local: Tues, Aug 14 2012 3:46 pm
Subject: Re: JParameter with params.xml definition file
Thanks !!! This link seems nice. I will read it.
Regards: framontb
El martes, 14 de agosto de 2012 21:29:52 UTC+2, Herman Peeren escribió:
> http://www.ostraining.com/howtojoomla/how-tos/development/getting-sta...
> On Tuesday, 14 August 2012 21:25:25 UTC+2, FRamonTB wrote:
>> Thanks for your help. I will try with these doc:
>> http://docs.joomla.org/Creating_a_custom_form_field_type
>> and these:
>> http://www.joomla25upgrade.com/joomla-25-tutorials/35-understanding-j...
>> If you know another, please, let me know.
>> Regards: framontb
>> El martes, 14 de agosto de 2012 21:05:08 UTC+2, elin escribió:
>>> Still available in 2.5 but won't be in 3 so really I would not use. I'm >>> sorry I can't even remember how to use it.
>>> Elin
>>> On Tuesday, August 14, 2012 1:16:19 PM UTC-4, Herman Peeren wrote:
>>>> Another Wiki article that needs updating: JParameter is deprecated; you >>>> should use JForm instead. DS should not be used anymore, for it has become >>>> superfluous as PHP handles slashes correctly nowadays, also on Windows.
>>>> On the other hand: deprecated means it is still available... So the >>>> question in the posting is still valid.What would the answer be?
>>>> On Tuesday, 14 August 2012 17:12:20 UTC+2, FRamonTB wrote:
>>>>> Yes, It's in Joomla 2.5 and I'm using DS and JParameter... shouldn't I?
>>>>> I was trying to follow this doc: >>>>> http://docs.joomla.org/Component_parameters
>>>>> What I should use?
>>>>> Thanks for you help !!!
>>>>> Regards: framontb
>>>>> El martes, 14 de agosto de 2012 02:55:31 UTC+2, elin escribió:
>>>>>> Is this in 1.5? Because you shouldn't be using DS and you shouldn't >>>>>> be using JParameter if you are in 2.5.
>>>>>> Elin
>>>>>> On Saturday, August 11, 2012 1:37:34 PM UTC-4, FRamonTB wrote:
>>>>>>> Hello all,
>>>>>>> I'm developing an MVC component and trying to use parameters in >>>>>>> front-end. In one view of the component I coded:
>>>>>>> jimport( 'joomla.html.parameter' );
>>>>>>> $paramsdefs = JPATH_COMPONENT.DS.'models'.DS.'itemparams.xml';
>>>>>>> $params = new JParameter($item->params, $paramsdefs);
>>>>>>> and it works well doing gets over the $params object. I do >>>>>>> $params->get('value','','group');
>>>>>>> and it returns the right value.
>>>>>>> The problem is that the method:
>>>>>>> $params->getGroups()
>>>>>>> Always return 'false'... I don't know why...
>>>>>>> My itemparams.xml file:
>>>>>>> <root>
>>>>>>> <params group="group">
>>>>>>> <param type="text" name="value" size="10" label="a label:" >>>>>>> description="a description" />
>>>>>>> </params>
>>>>>>> </root>
>>>>>>> Any help will be apreciated. Regards: framontb
You must
Sign in before you can post messages.
You do not have the permission required to post.