On Mon, 2004-04-12 at 18:25, Tarjei Huse wrote:
> Hi, I got a few comments to midcom-template.xml:

> a) As midcom-template shows how to implement a midcomsite, it should use
> style-init instead of ROOT as it's root element.
> 
> b) Also, it should use midcom_show_style("/path/to/element-name");
> instead of <(element)>.
> 
> c) Midcom-template has been implemented without the $GLOBALS array. This
> breaks some instalations, depending on the settings in php.ini. The
> attached patch fixes this.

10:25 < tarjei> Midcom Q:How does tha ROOT element and style-init relate
to each other?
10:26 <@torben> they don't, at least not technically
10:27 <@torben> root is a midgard thing, it is related to the site-wide
style
10:27 <@torben> style-init and style-finish are special midcom-stuff
10:27 < tarjei> ok, but If I want to produce a page I need to have a
ROOT element in the style I want to use, right
10:27 <@torben> right
10:28 <@torben> the regular page-style is used like always, it usually
contains navigation elements and somewhere the reference to <[content]>,
in which usually
                $midcom->content() (or whatever this was called again)
is executed.
10:29 < tarjei> and it is in the context of what happens inside
$midcom->content() that you can use midcom_show_style()`?
10:29 <@torben> right
10:29 < tarjei> so the only parts of a style you can overwrite is the
ones that are inside the <(content)> element?
10:30 <@torben> you cannot use midcom_show_style outside of midcom
10:30 <@torben> yes, or more specifically:
10:30 <@torben> you can overwrite style elements defined by the
component handling the request, this might differ from component to
component
10:30 <@torben> the default elements here are to be found in the _style
subdir of a component
10:31 <@torben> about style-init/finish: each time, midcom invokes a
component, both the main request in the page's <[content]> area and in
all dynamic_load
                requests, midcom first calls the style-init element of a
given component style, then the content output of the component is
shown, and after that,
                it always calls style-finish.
10:31 < tarjei> so than a lot of this mail:
http://marc.theaimsgroup.com/?l=midgard-user&m=108178718414005&w=2 is
wrong
10:34 <@torben> tarjei: about point b), this basically works, but only
within a valid midcom context. it _might_ work already after midcom
completed the handle
                phase, but this is not certain, as the state of the
midcom style engine is only clerly defined after the content method has
initialized the system
                complelty and entered the right context
10:34 <@torben> (midcom->dynamic_load() does the same btw. for the
dynamically loaded request at least
10:35 <@torben> about point c) you should mention, that explicit usage
of $GLOBALS or global xyz is absolutly mandatory for midcom, as is the
usage of $_REQUEST and
                the like, as midcom must always be usable without
register_globals


> 
> 
> Any comments?
> Tarjei
> 
> 
> ______________________________________________________________________
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to