1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Deprecate noTableRender from template files - send template name to tablerender() $mode instead for less confusion and consistent logic.

This commit is contained in:
Cameron 2013-04-14 17:08:38 -07:00
parent 3edc2035e6
commit c7bf05b06f
4 changed files with 16 additions and 22 deletions

View File

@ -6,20 +6,14 @@
$MENU_TEMPLATE['default']['start'] = '';
$MENU_TEMPLATE['default']['body'] = '{CMENUBODY}';
$MENU_TEMPLATE['default']['noTableRender'] = false; // XXX Let the theme decide.
$MENU_TEMPLATE['button']['start'] = '<div class="cpage-menu">';
$MENU_TEMPLATE['button']['body'] = '{CMENUBODY}{CPAGEBUTTON}';
$MENU_TEMPLATE['buttom-image']['end'] = '</div>';
$MENU_TEMPLATE['button']['noTableRender'] = false;
$MENU_TEMPLATE['buttom-image']['start'] = '<div class="cpage-menu">';
$MENU_TEMPLATE['buttom-image']['body'] = '{CMENUIMAGE}{CPAGEBUTTON}';
$MENU_TEMPLATE['buttom-image']['end'] = '</div>';
$MENU_TEMPLATE['buttom-image']['noTableRender'] = false;
?>

View File

@ -75,7 +75,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
$PAGE_TEMPLATE['default']['end'] = '</div>';
// options per template - disable table render
$PAGE_TEMPLATE['default']['noTableRender'] = false;
// $PAGE_TEMPLATE['default']['noTableRender'] = false; //XXX Deprecated
// define different tablerender mode here
$PAGE_TEMPLATE['default']['tableRender'] = 'cpage';
@ -91,7 +91,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
';
$PAGE_TEMPLATE['custom']['end'] = '</div>';
$PAGE_TEMPLATE['custom']['noTableRender'] = true;
// $PAGE_TEMPLATE['custom']['noTableRender'] = true; //XXX Deprecated
$PAGE_TEMPLATE['custom']['tableRender'] = '';

View File

@ -285,20 +285,20 @@ class e_menu
$text = $tp->parseTemplate($template['body'], true, $page_shortcodes);
// echo "TEMPLATE= ($mpath)".$page['menu_template'];
if($template['noTableRender'] !==true)
{
$ns->tablerender($caption, $text);
}
else
{
echo $text;
}
// if($template['noTableRender'] !==true) // XXX Deprecated - causes confusion while themeing.
// {
$ns->tablerender($caption, $text, 'cmenu-'.$page['menu_template']);
// }
// else
// {
// echo $text;
// }
}
else
{
$text = $tp->toHTML($page['menu_text'], true, 'parse_sc, constants');
$ns->tablerender($caption, $text);
$ns->tablerender($caption, $text, 'cmenu');
}
}

View File

@ -439,12 +439,12 @@ class pageClass
$ret = e107::getParser()->simpleParse($template, $vars);
}
if(vartrue($this->template['noTableRender']))
{
return $ret;
}
// if(vartrue($this->template['noTableRender'])) //XXX Deprecated - use tablerender $mode instead. eg. cpage-templatename : echo $text;
// {
// return $ret;
// }
$mode = vartrue($this->template['tableRender'], 'cpage');
$mode = vartrue($this->template['tableRender'], 'cpage-'.$template);
$title = $vars->title;
return e107::getRender()->tablerender($title, $ret, $mode, true);