Share » Forums » Developer » How to make "empty" view in module?

How to make "empty" view in module?

How to make "empty" view in module?

Tuesday 22 July 2003 10:16:17 am - 3 replies

Author Message

Selmah Maxim

Wednesday 23 July 2003 12:32:44 am

try this, not sure will work !

$ViewMode = $Params['ViewMode'];
if (!$ViewMode)
$ViewMode="view";

Jan Borsodi

Wednesday 23 July 2003 1:01:53 am

To this you must turn of views for your module by editing module.php and setting

$Module = array( "name" => "Adds",
"variable_params" => true,
"function" => array(
"script" => "adds.php",
"params" => array( "ViewMode" ) ) );

You must then do a check in adds.php for ViewMode and open up the correct script accordingly. Something like.

$viewMode = $Params['ViewMode'];
if ( $viewMode == 'view' )
include( 'path/to/script/view.php' );
else if ( $viewMode == 'edit' )
include( 'path/to/script/edit.php' );
else
include( 'path/to/script/view.php' );

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Jerry Jalava

Wednesday 23 July 2003 9:33:06 am

Thanks, I'll give it a try...

I encountered to other problem...
When I fetch something from template with fetch function, what kind of data my addsfunctioncollection.php should return? (That is the file that returns the data to template after fetch, right?)

It should return somekind of array right? I tracked the module ezurl's functions and founded it too complex for this... ;)

After fetch has been made in template I'm connecting to function_definition.php and through that to addsfunctioncollection.php's function fetchList()... fetchList function gets variables from function fetchListFromDB(). FetchListFromDB returns back to fetchList an arrayquery in a variable and then fetchList returns this to template with [code] return array( 'result' => &$list ); [/code]...
- Should I parse it somewhere before I send it to template?
- How can I get that data in template? ($List:item.?)
- Is there a way to just check everything that comes to template?

OK, I thinks that was already too much to ask, but I hope someone could lighten me up even a bit... I'm soooo close to finnishing this ez portal project. I only need few modules witch I have to make...

Thanks a lot, :D
Jerry

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

36 542 Users on board!

Forums menu