* $this->page= loadPage($name);
*/
- function loadPage($name)
+ function loadPage($name, $default = false)
{
// used to load sub elements. of a site..
if (preg_match('/\*$/', $name)) {
}
-
+ function assignMeta()
+ {
+ foreach(func_get_args() as $argsItem){
+ if(!$argsItem)
+ continue;
+
+ if(empty($this->title) && !empty($argsItem->title)){
+ $this->title = ' - ' . $argsItem->title;
+ }
+ if(empty($this->keywords) && !empty($argsItem->keywords)){
+ $this->keywords = $argsItem->keywords;
+ }
+ if(empty($this->descriptions) && !empty($argsItem->descriptions)){
+ $this->descriptions = $argsItem->descriptions;
+ }
+ }
+ $x = DB_DataObject::factory("cms_page");
+ $x->whereAdd("language = ''");
+ $x->get("page_link", "Home");
+ if(empty($this->title) && !empty($x->title)){
+ $this->title = ' - ' . $x->title;
+ }
+ if(empty($this->keyword) && !empty($x->keywords)){
+ $this->keywords = $x->keywords;
+ }
+ if(empty($this->descriptions) && !empty($x->descriptions)){
+ $this->descriptions = $x->descriptions;
+ }
+ }
function herr( $error_name, $args = array(), $redirect=false )