sitename() and meta-tags

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: sitename() and meta-tags

Post by Holger » Fri Jan 29, 2010 10:43 am

Yep, thanks for quick reply and the solution, Gert.
(should be something better explained, as so much other things...)

I've found the old thread and found out why it was designed this way.
But I forgot it :oops: - Das Alter... :?

Holger

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: sitename() and meta-tags

Post by Gert » Fri Jan 29, 2010 10:47 am

Holger wrote:But I forgot it :oops: - Das Alter... :?
I think, you are so very much younger than me (hot-blooded) :lol:
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: sitename() and meta-tags

Post by Holger » Fri Jan 29, 2010 10:54 am

Gert wrote:
Holger wrote:But I forgot it :oops: - Das Alter... :?
I think, you are so very much younger than me (hot-blooded) :lol:
I think I'll stay hot-blooded even if I'm 85 years old :mrgreen: .
But you don't need all fingers of both hands to calculate the difference in age between us :| .

Anyway. I see it's better and more flexible the way it is now.


Holger

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: sitename() and meta-tags

Post by Holger » Fri Jan 29, 2010 10:59 am

phg wrote: And he is very surprised, that the Meta "Titel" is shown by the function sitename(). He (and I) think, that this is not correct. The content of the meta tags is determined for the robots, not for showing in the html-document.
But that's not true. The "Title" is thought to be shown as the title of a page in the list of the serchresults.
So it's not only determined for robots.

Holger

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: sitename() and meta-tags

Post by Gert » Fri Jan 29, 2010 11:24 am

We also could rename sitename() to pagename() in cms.php.

And create a new function sitename() using $tx['site']['title'], were that more clear?
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: sitename() and meta-tags

Post by Holger » Fri Jan 29, 2010 11:28 am

Gert wrote:We also could rename sitename() to pagename() in cms.php.

And create a new function sitename() using $tx['site']['title'], were that more clear?
Seems to be a better solution since there are many templates out there including sitename().
With an update to XH the user may get confused like Horsts.
BTW: The tooltip of the Meta-Plugin should be changed too IMO.

Holger

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: sitename() and meta-tags

Post by Gert » Fri Jan 29, 2010 11:58 am

Hallo, changed and tested in newest utf-8 Version:

Code: Select all

function sitename() {
    global $tx;
    return isset($tx['site']['title']) ? $tx['site']['title'] : ''; // changed by GE CMSimple_XH 1.2
}

function pagename() { // changed by GE CMSimple_XH 1.2
    global $cf;
    return isset($cf['site']['title']) ? $cf['site']['title'] : ''; // changed by LM CMSimple_XH 1.1
} 
Now we don't must add it to the gdm-list, it's solved ;)

@Horst: overwrite the whole function sitename() in cms.php with that code.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Post Reply