[TYPO3-english] TypoScript: conditional wrap question
JoH asenau
info at cybercraft.de
Sat Sep 26 20:53:11 CEST 2009
> The TypoScript below works as desired, but I feel there's a simpler
> way.
>
> Any help? The successful helpers will be mentioned in an upcoming
> Acqal Blogging post. Thank you!
>
> Output
>
> no page author or page email, then no tag
>
> page author only exists
> <meta name="author" content="Michael Cannon" />
>
> page email only exists
> <meta name="author" content="mc at acqal.com" />
>
> both page author or page email exists
> <meta name="author" content="Michael Cannon (mc at acqal.com)" />
> --
>
Just trying to avoid the CASE:
10 = TEXT
10 {
data = page:author
ifEmpty.data = page:author_email
required = 1
postCObject = TEXT
postCObject {
data = page:author_email
noTrimWrap = | (|)|
if.isTrue.data = page:author
required = 1
}
wrap = <meta name="author" content="|" />
}
no tested though
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