|
From: Alex B. <en...@tu...> - 2001-08-20 19:54:07
|
hmmmm...
how about changing:
<modules>
<content>
<layout>
<name>exmaple_layout</name>
<package>html.layouts</package>
</layout>
<load>
<module>
<id>product_list</id>
<name>ProductLister</name>
<package>user.mod.products</package>
<load_order>1</load_order>
</module>
<module>
<id>product_delete</id>
<name>DeleteProduct</name>
<package>user.mod.products</package>
<load_order>2</load_order>
</module>
</load>
</content>
</modules>
to:
<groups>
<content>
<layout>
<name>exmaple_layout</name>
<package>html.layouts</package>
</layout>
<modules>
<module>
<id>product_list</id>
<name>ProductLister</name>
<package>user.mod.products</package>
<load_order>1</load_order>
</module>
<module>
<id>product_delete</id>
<name>DeleteProduct</name>
<package>user.mod.products</package>
<load_order>2</load_order>
</module>
</modules>
</content>
</groups>
Odysseas and I had discussed a way of "getting around" the "no name" thing
by making an assumption:
if you want an xml2php source xml to have "keyless" arrays, you define an
xml structure as follows:
<things>
<thing>moo</thing>
<thing>moo</thing>
<thing>moo</thing>
</things>
i.e. plural and singlular.
> The xml2php is already working quite nice [for me]. However, there is a
> small problem with pagedef (bcp.xml). Currently modules are defined under
> 'load' as arrays, but unlike all other arrays in bcp.xml and any other
> place, they have no name [key, whatever]. (small example bellow).
>
> $gPageDef = array(
> 'modules' => array(
> 'content' => array(
> 'load' => array(
> array(
> 'id' => 'mooboo',
> 'name' => "OtherWorld",
> 'package' => "hello_world",
> 'load_order' => "3"
> ),
> ),
> ),
> );
>
> The bad news are that in XML we can't define array without name. We can only
> define something like this:
> $gPageDef = array(
> 'modules' => array(
> 'content' => array(
> 'load' => array(
> 'module' => array(
> 'id' => 'mooboo',
> 'name' => "OtherWorld",
> 'package' => "hello_world",
> 'load_order' => "3"
> ),
> ),
> ),
> );
>
> I'm afraid we will have to modify the way Page uses modules (add support for
> module names) if we want to see xml2php working. Any ideas or comments?
>
> Andris Spruds
|