Forums / Setup & design / behavior of variable $module_result.content

behavior of variable $module_result.content

Author Message

tic 9

Thursday 17 April 2008 7:09:41 am

hello!

I would like to know the behavior of variable $module_result.content. Indeed, I developpe under ez now and I have a problem with the loading of my page; it is problem is which the data owing to lack of ez posts with the starting of the page except the rules that I defined.
what to make?

Kristof Coomans

Thursday 17 April 2008 7:36:16 am

Hi

I recommend you reading http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_pagelayout/variables_in_pagelayout#module_result. Good luck!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

tic 9

Friday 18 April 2008 1:46:13 am

Thank you with you for your answer!
But I think that my question was not also clear; I need to understand why $module_result.content posts as of the loading of the page the elements that me I is not defined

Kristof Coomans

Friday 18 April 2008 2:22:37 am

Hi

I'm afraid I still didn't understand the question :)

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

tic 9

Friday 18 April 2008 6:54:21 am

Hi!
my question is as follows: I work on a project with eZ but with each time I reload the page, there are elements which are posted I do not want. I know that $module_result.content posts the elements of the requete or the elements are in the course of execution. But why when I launch the page, the elements by defect are posted but the posting of its elements is made any rĂªquete in progres

André R.

Friday 18 April 2008 7:07:23 am

I'm also not sure what you mean, to make sure we talk about the same thing, here is some info on how modue_result is generated.

When you request a page in eZ Publish, it decides what module to run based on the url.
If the url isn't a system url ( aka index.php/<site_access>/<module>/<view>/<optional_params> ), it will assume it is a nice url ( aka index.php/<site_access>/Home/About_us ) and run the 'content' module and view 'view' ( in kernel/content/view.php ), if successful this module then returns a $Result hash with things like 'content' and 'path' witch eZ Publish uses as $module_result variable when it runs your pagelayout.tpl file (last step).

So $module_result.content is the generated content from the module, in the case of the content module it is generated by node templates. So if you want to change the $module_result.content content, you need to look into changing (preferably overriding ) node templates.

Modules and views:
http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/modules_and_views

Override system:
http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_template_override_system

Walkthrue on creating a eZ Publish site (touches node templates, overrides, classes and pagelayout):
http://ez.no/ezpublish/documentation/building_an_ez_publish_site

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom