Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
JParameter with params.xml definition file
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
FRamonTB  
View profile  
 More options Aug 11 2012, 1:37 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
elin  
View profile  
 More options Aug 13 2012, 8:55 pm
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
FRamonTB  
View profile  
 More options Aug 14 2012, 11:12 am
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ó:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Herman Peeren  
View profile  
 More options Aug 14 2012, 1:16 pm
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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
elin  
View profile  
 More options Aug 14 2012, 3:05 pm
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Herman Peeren  
View profile  
 More options Aug 14 2012, 3:23 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
FRamonTB  
View profile  
 More options Aug 14 2012, 3:25 pm
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ó:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Herman Peeren  
View profile  
 More options Aug 14 2012, 3:29 pm
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...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
FRamonTB  
View profile  
 More options Aug 14 2012, 3:46 pm
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ó:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »