Page 1 of 1
[Solved] Where is the <title> generated?
Posted: Wed Apr 18, 2007 9:02 pm
by 10010110
My client asked me to add the domain/site nme to the admin panel’s title, probably because it can get confusing if you have more sites with the CMS and it’s just showing “Pages” on the page listing page. I’ve searched and searched but I can’t find the place where the title element is generated/inserted.
I know it doesn’t work by changing the appropriate language array as there are more places where this item is displayed (e.g. the breadcrumb navigation) and I think it would be sufficient if I just hard code it into the source file. But which file is it? Where is the element generated?
Any help appreciated.
Re: Where is the <title> generated?
Posted: Wed Apr 18, 2007 9:34 pm
by Nullig
I believe it's in the language file for admin located in the /admin/lang/en_US/admin.inc.php file.
Nullig
Re: Where is the <title> generated?
Posted: Wed Apr 18, 2007 10:47 pm
by tingeltangeltill
10010110 wrote:
Where is the element generated?
If you look in the template, you see that:
Code: Select all
<title>{sitename} - {title}</title>
You just have to go to global settings and set in the sitename and then your customer should be satisfied
regards till
Re: Where is the <title> generated?
Posted: Thu Apr 19, 2007 4:28 am
by Dr.CSS
I believe they were looking to change the title in the admin/backend, Nullig is right...
also if you use admin title in the search the second hit will tell you which lines to change...
Re: Where is the <title> generated?
Posted: Thu Apr 19, 2007 12:15 pm
by 10010110
Well, I’ve already suspected that it would be in the language file. However, as I said, when I chage that line:
Code: Select all
$lang['admin']['pages'] = 'Pages';
then the breadcrumb navigation below the menu will also be changed. And that’s not what I want. So I thought I might search for the place where the title element is generated to hard code it in there - independent of any language (since it’s the site URL there doesn’t need to be a translation).
And I’ve searched the forums before asking my question (I always try to find the solution myself before asking) but the results didn’t really help me (or I just didn’t understand), that’s why I’m asking.
Re: Where is the <title> generated?
Posted: Thu Apr 19, 2007 2:31 pm
by Nullig
In the admin.inc.php file, look for these entries:
Code: Select all
$lang['admin']['adminsystemtitle'] = 'CMS Admin System';
$lang['admin']['adminpaneltitle'] = 'CMS Made Simple Admin Panel'; // needs translation
$lang['admin']['logintitle'] = 'CMS Made Simple Admin Login'; // needs translation
Nullig
Re: Where is the <title> generated?
Posted: Mon Apr 23, 2007 10:46 pm
by 10010110
You seem not to understand me correctly. I don’t want to change the headlines of the admin panel, I wanna change the title of the document (the stuff in between the tags), the text that is displayed at the top in the browser window.
And to say it the third time: If I change the line in the admin.inc.php file that reads:
Code: Select all
$lang['admin']['pages'] = 'Pages';
…it
does change the title but it’s also changing the text in the breadcrumb navigation (bottom left of atteched image).
And I can’t find the file where the actual element is generated…

Re: Where is the <title> generated?
Posted: Sun Apr 29, 2007 1:11 pm
by 10010110
So… nobody is able to tell me how I can change that without changing the breadcrumb navigation too? Any source developer here that knows a solution?
Please, that’s very important to me (or to my boss at least but I’m the one that has to answer the questions that keep on coming).

Re: Where is the <title> generated?
Posted: Sun Apr 29, 2007 1:31 pm
by tsw
title is generated in admintheme class. (/var/classes/class.admintheme.inc.php) you could copy function DisplayHTMLHeader to default theme and modify it to your needs.
for example using something like
cms->siteprefs[sitename] ." - ". $this->title ?>
I also agree that its hard to navigate between multiple installations, maybe title should include sitename as default and the header in admin should also include sitename..
hope this helps..
Re: Where is the <title> generated?
Posted: Sun Apr 29, 2007 2:26 pm
by 10010110
Thank you, thank you very much! That did it!
Just to clarify (in case someone is also looking for that solution): The admintheme class file resides in “/
lib/classes/” (not “var” directory).
Thanks again, tsw. You saved my life.
