diff --git a/outputhtml.php b/outputhtml.php
index ced574d..9ff078f 100644
--- a/outputhtml.php
+++ b/outputhtml.php
@@ -87,12 +87,6 @@ class outputhtml extends output
EOT;
}
- // Do the title replacement in the replacement structure
- if (! isset ($replacement["{flash}"]))
- $replacement["{flash}"] = "";
- foreach ($replacement as $key=>$val)
- $layoutPage = str_replace ($key, $val, $layoutPage);
-
// All the entries coming from views in array are substitute in layout
// {content}, {title}
if (is_array ($resView))
@@ -105,6 +99,12 @@ EOT;
else
$layoutPage = str_replace ("{content}", $resView, $layoutPage);
+ // Do the title replacement in the replacement structure
+ if (! isset ($replacement["{flash}"]))
+ $replacement["{flash}"] = "";
+ foreach ($replacement as $key=>$val)
+ $layoutPage = str_replace ($key, $val, $layoutPage);
+
// Remove the not used {XXX}
$layoutPage = preg_replace ("~({\S+})~", "", $layoutPage);