Share » Forums » Developer » Module parameters

Module parameters

Module parameters

Monday 30 July 2007 2:16:08 am - 3 replies

Author Message

Heath

Monday 30 July 2007 12:10:01 pm

Why not use the eZ http variable naming convention for your form variables?
<i>http://ez.no/ezpublish/documentation/development/standards/php#eztoc80797_13</i>

I think this is MixedCaseStyle convention. I would try to change 'test' to 'TestVariable' and try again.

Also if that does not meet your needs you may wish to change 'params' to 'unordered_params' and try again.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Bruce Morrison

Monday 30 July 2007 4:34:13 pm

Hi Julien

The "params" in the module.php definition refers to parameters that are passed in the URL not via a form.

Your definition allows for URLs of the form /modulename/modulego/[ContentNodeID]/[test] This will set the $Params values you require but I'm not sure that this is the easiest way to achieve what you are trying to do.

You are probably better off retrieving the form variables using the eZHTTPTool. class e.g.

include_once( "lib/ezutils/classes/ezhttptool.php" );
$http =& eZHTTPTool::instance();
$test=false;
$ContentNodeID=false;
if ( $http->hasPostVariable( 'ContentNodeID' ) )
  $ContentNodeID=$http->postVariable( 'ContentNodeID' );
if ( $http->hasPostVariable( 'test' ) )
  $test=$http->postVariable( 'test' );

See http://pubsvn.ez.no/doxygen/trunk/html/classeZHTTPTool.html

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Julien Plesniak

Tuesday 31 July 2007 12:51:24 am

Thanks it work perfectly

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu