Forums / Developer / Writing new modules / Comment38074

Author Topic

Sergiy Pushchin

Thursday 12 June 2003 11:19:56 am

Comment38074

1. You are right.
2. Yes you are right.
ViewList is set of views defined for module, for each view you define:
'functions' - to which functions user should have access to to be able to execute this view. so it used for permission system.
'default_navigation_part' - navigation part which should be active when this view is executed.
'single_post_functions' and 'post_action_parameters' is a mapping between post variables (buttons, input fields) and actions inside view.
'script' - php file which should be executed when user acceses this view.
'params' - params in url. for example url is 'content/edit/29658/1', content is modeule name, edit is view name and the last two numbers will be interpreted as parameters for the view.
"params" => array( "ObjectID", "EditVersion", 'EditLanguage' )
So inside a view you will be able to access
$Params["ObjectID"]; and $Params["EditVersion"]; they will get values 29658 and 1 by order. $Params["EditLanguage"]; will be empty since in url we have only two parts after view name separated with '/'
3.You are right.

about these two lines
$http =& eZHTTPTool::instance();
If you don't use it, it is not nessesary to put this line in view file

$Module =& $Params["Module"];
The same with this one. $Module object you get in this line gives you a lot of control on execution. For example you can use http redirections using its methods.