[TYPO3-english] Meta data (keyword, description etc) recursive?

JoH asenau info at cybercraft.de
Wed Jun 10 12:40:45 CEST 2009


> Is it possible fetch data from a field from the root of the pagetree,
> if it isn't set on the page you  are on?

Yes

> Ex. I have a client using the metadata fields (keyword, description)
> but haven't entered data on every single page, so i would like to
> fetch the data from the parent page or the root of the page tree.
>
> How can I make this possible?

Use stdWrap.data (which is of the type getText).
It offers levelfield to fetch data form the rootline the same way as
leveluid, leveltitle and levelmedia do it.
To enable additional fields being fetched with levelfield too, you have to
add them to the list of rootline fields in the install tool.
Then you can do something like this:

lib.meta = TEXT
lib.meta {
    data = levelfield:-1, fieldname, slide
}

Additionally you might want to take a look at this:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.1/view/1/2/#id4252676
Check out the getText section.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
TYPO3 workshops: http://workshops.eqony.com




More information about the TYPO3-english mailing list