diff --git a/lib/PageRender.php b/lib/PageRender.php index a602d1f..5713bd7 100644 --- a/lib/PageRender.php +++ b/lib/PageRender.php @@ -97,6 +97,9 @@ class PageRender extends Visitor { $this->visit('',$attribute); } + + // Sort our attribute values for display. + $this->template->sort(); } } diff --git a/lib/Template.php b/lib/Template.php index 455baa1..e145753 100644 --- a/lib/Template.php +++ b/lib/Template.php @@ -1563,5 +1563,9 @@ class Template extends xmlTemplate { public function isNoLeaf() { return $this->noleaf; } + + public function sort() { + usort($this->attributes,'sortAttrs'); + } } ?> diff --git a/lib/xmlTemplates.php b/lib/xmlTemplates.php index 08389de..f27236b 100644 --- a/lib/xmlTemplates.php +++ b/lib/xmlTemplates.php @@ -447,9 +447,6 @@ abstract class xmlTemplate { else debug_dump_backtrace(sprintf('There was a request to add an attribute (%s), but it was already defined? (%s)',$attrid,__METHOD__),true); - if ($this->getID() == 'none') - usort($this->attributes,'sortAttrs'); - return $attribute; }