[Solved] Where is the <title> generated?
-
10010110
[Solved] Where is the <title> generated?
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.
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.
Last edited by 10010110 on Fri Jul 20, 2007 4:10 am, edited 1 time in total.
Re: Where is the <title> generated?
I believe it's in the language file for admin located in the /admin/lang/en_US/admin.inc.php file.
Nullig
Nullig
-
tingeltangeltill
Re: Where is the <title> generated?
If you look in the template, you see that:10010110 wrote: Where is the element generated?
Code: Select all
<title>{sitename} - {title}</title>regards till
Re: Where is the <title> generated?
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...
also if you use admin title in the search the second hit will tell you which lines to change...
-
10010110
Re: Where is the <title> generated?
Well, I’ve already suspected that it would be in the language file. However, as I said, when I chage that line:
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.
Code: Select all
$lang['admin']['pages'] = 'Pages';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?
In the admin.inc.php file, look for these entries:
Nullig
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
-
10010110
Re: Where is the <title> generated?
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:
…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…

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';
And I can’t find the file where the actual element is generated…
-
10010110
Re: Where is the <title> generated?
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).
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?
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..
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..
-
10010110
Re: Where is the <title> generated?
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.
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.


