TYPO3-Testaccount
Testen Sie die aktuellste TYPO3-Version kostenlos und unverbindlich für einen Monat!

Jetzt testen!

Schulungen

pageTitle im Description


Autor Nachricht
Verfasst am: 06. 10. 2011 [15:19]
Howard
Themenersteller
Dabei seit: 06.10.2011
Beiträge: 2
Hello, please excuse the English ...

How does one automatically enter the Page Title into the Meta field description?

I am using the Introduction Package 4.5

The page.meta template sets the meta tag 'description' in Setup:
page.meta {
description = {$plugin.meta.description}
}
. . . and the description string value is defined in the root template Constant:
plugin.meta {
description = description string goes here
}

But now how do I dynamically include each Page Title in the Description meta tag?

Any clues will be appreciated.
Profil
Verfasst am: 06. 10. 2011 [23:11]
Chrissli
Dabei seit: 19.04.2010
Beiträge: 503
Hello Howard,

please excuse my english, too.

I'm quite not sure why you are using {plugin.meta.description}

You can use the normal database fields as usual, including the
fields 'description','keywords' e.g. which can be set for each
page under 'META' while editing the page itself ( not it's contents ).

To use a page title in description you can simply type

TYPOSCRIPT
page.meta {
  description.field = title
}


Actually, you can use nearly every field from the table 'pages'
in your database instead of 'title'

The TS listed above will fill the description ONLY with the page's title.
To combine it with e.g. the description in the META-field description you
might want to use stdWrap or dataWrap.

Hope this was useful for you.

MfG,
Chris


God's in his Heaven -
All's right with the world!
ProfilICQ
Verfasst am: 07. 10. 2011 [15:21]
Howard
Themenersteller
Dabei seit: 06.10.2011
Beiträge: 2
Thank you, Chrissli!

I have used this:
TYPOSCRIPT
description.dataWrap = {field:title} - {$plugin.meta.description}


I guess I'm using
TYPOSCRIPT
{plugin.meta.description}
because the Introduction package 4.5 comes with a ready built 'Pages' template "plugin.meta" that pulls in constant values from the main template.

Regardless, your reply certainly has helped in understanding the db structure TS.

God bless.
Profil