|
From: Justin F. <je...@ey...> - 2001-07-08 11:22:02
|
Odysseas:
Nope, nada, niente, pas de tout, is
load_order having _ANY_ effect on the
disto index.php.
If I comment the layout template in index.php, thus:
'modules' => array(
'content' => array(
# 'layout' => array(
# 'name' => "example",
# 'package' => "html.layouts",
# ),
then the load order still follows the order of the
module appearance in index.php, instead of
the appearance to load_order of
1st 3
2nd 6
3rd 1
4th 5
5th 4
6th 2
I never have understood this...
If I put:
echo "<pre>";
var_dump($Page->modules['content']);
echo "</pre>";
in the HelloWorld.php module, I get
array(6) {
[0]=>
object(otherworld)(1) {
["stuff"]=>
string(25) "This is some sample stuff"
}
[1]=>
object(set_lang_example)(0) {
}
[2]=>
object(helloworld)(2) {
["options"]=>
array(2) {
["example"]=>
string(23) "this is an option value"
["another"]=>
int(1)
}
["date"]=>
string(12) "Jul:Sun:2001"
}
[3]=>
object(helloworld)(2) {
["options"]=>
NULL
["date"]=>
string(12) "Jul:Sun:2001"
}
[4]=>
object(helloworld)(2) {
["options"]=>
NULL
["date"]=>
string(12) "Jul:Sun:2001"
}
[5]=>
object(helloworld)(2) {
["options"]=>
NULL
["date"]=>
string(12) "Jul:Sun:2001"
}
which means it is not sorting, but following appearance order.
I even added your ksort fix in Page.php where you said it
should go, and it still just follows appearance order.
_jef
------------------------
Odysseas Tsatalos wrote:
>
> But you were right that the rest of the code
> isn't behaving the way it was supposed to :-)
>
> I needed to add a ksort right before the end of the
> IncludeModules function
>
> ksort($this->modules[$_group]);
>
> Keep in mind that the the "example" layout that
> index.php comes with is not following the
> default order but it explicitly alters it.
--
Justin Farnsworth
Eye Integrated Communications
321 South Evans - Suite 203
Greenville, NC 27858 | Tel: (252) 353-0722
|