Your right Mamba about the hardcoded <title> in the themes.
Anyway this hardcode problem (more than one php variable is defined for one smarty) is not limited to the themes. It is generally used in modules/core and make customization very hard especially for new webmasters.
IMO we need to define a theme creating standard for xoops too.
we need a separate topic for that and need to review all themes and discuss about that.
for example about this title issue it is hardcoded in the class/theme.php codes:
$this->template->assign(array(
'xoops_theme' => $xoops->getConfig('theme_set'),
'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->getConfig('theme_set') . '/',
'xoops_themecss' => $xoops->getCss($xoops->getConfig('theme_set')),
'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES),
'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES),
'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES),
'xoops_dirname' => $xoops->moduleDirname,
'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ',
'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES)
));
$this->template->assign(array(
'theme_path' => $this->path,
'theme_tpl' => $this->path . '/xotpl',
'theme_url' => $this->url,
'theme_img' => $this->url . '/img',
'theme_icons' => $this->url . '/icons',
'theme_css' => $this->url . '/css',
'theme_js' => $this->url . '/js',
'theme_lang' => $this->url . '/language',
));
As you can see we have xoops_slogan smarti variable but again it is used in xoops_pagetitle variable. It is bad coding.
We already have xoops_slogan and xoops_sitename smarties.
we should define a xoops_modulename smarty that back the module name or empty string if the module is not exist:
'xoops_modulename' => $xoops->isModule() ? $xoops->module->getVar('name') : '';
then xoops_array_pagetitle should be an array defined in class/theme.php like this:
$xoops_array_pagetitle = array();
....
'xoops_array_pagetitle' => $xoops_array_pagetitle,
and can be defined for each module separately (can be fully customized eg: page title - page subtitle - cat title - sub cat title - sub sub cat title)
for example for publisher module like this:
$xoops_array_pagetitle['item_title'] = ...
$xoops_array_pagetitle['item_subtitle'] = ...
or for newbb like this:
$xoops_array_pagetitle['post_title'] = ....
$xoops_array_pagetitle['topic_title'] = ....
$xoops_array_pagetitle['cat_title'] = ....
$xoops_array_pagetitle['forum_title'] = ... (sub forums and others included)
then all modules can use the unify below code to assign xoops_array_pagetitle like this:
$xoopsTpl->assign('xoops_array_pagetitle',$xoops_array_pagetitle);
then can be used in all themes like this:
<title>
<{if $xoops_array_pagetitle}>
<{foreachq item=xo_title from=$xoops_array_pagetitle}>
<{$xo_title}> :
<{/foreach}>
<{/if}>
<!-- irmtfan for backward compatibility -->
<{if $xoops_pagetitle !=''}> <{$xoops_pagetitle}> : <{/if}>
<{$xoops_modulename}> : <{$xoops_slogan}> : <{$xoops_sitename}> </title>
The above is the final solution for full customization of title in the head without hardcoding.
i can implement the above by modifying class/theme.php and show the use in theme.html or other html like xometas.html