SiteName - SiteSubtitle - SiteSlogan

There a function sitename(); in cms.php.

function sitename() {
	global $cf;
	return $cf['site']['title'];
}

with a config variable

$cf['site']['title'] = "The name of the Site";

Sometime its a demand to have easily editable site subtitle and/or a slogan. For this purpose a newsbox might be used. But easier seems to edit slightly the cms.php Copy/paste/rename the funtion sitename(); e.g.:

function sitetitle() {
	global $cf;
	return $cf['site']['title'];
}
function sitesubtitle() {
	global $cf;
	return $cf['site']['subtitle'];
}
function siteslogan() {
	global $cf;
	return $cf['site']['slogan'];
}

add new variables to the config.php

$cf['site']['title'] = "The name of the Site";
$cf['site']['subtitle'] = "The subtitle of the Site";
$cf['site']['slogan'] = "The slogan";

make css definitions for subtitle and slogan in stylesheet.css and call the functions in your template on desired places:

<?php echo sitetitle();?>
<?php echo sitesubtitle();?>
<?php echo siteslogan();?>

For multilingual websites change the variable in cms.php:

function sitetitle() {
	global $tx;
	return $tx['site']['title'];
}
function sitesubtitle() {
	global $tx;
	return $tx['site']['subtitle'];
}
function siteslogan() {
	global $tx;
	return $tx['site']['slogan'];
}

and extend your “language.php” by:

$tx['site']['title'] = "The name of the Site";
$tx['site']['subtitle'] = "The subtitle of the Site";
$tx['site']['slogan'] = "The slogan";

In this case you may simply use also multilingual sitetitle and new added lines.

tips_and_tricks/sitename_-_sitesubtitle_-_siteslogan.txt · Last modified: 2018/04/05 14:48 (external edit)
Webdesign: NMuD chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0