[TYPO3-english] Check with Typoscript if Templavoila "Link field" is set

Søren Madsen sma at science.au.dk
Thu Oct 7 15:47:26 CEST 2010


The following Typoscript renders a "read online" link for a newsletter:

lib.readonlinelink = TEXT
lib.readonlinelink.value = {$readonlinelinktext.da}
lib.readonlinelink.typolink {
         parameter.data = getIndpEnv:TYPO3_REQUEST_URL
         title = {$readonlinelinktext.da}
}

"lib.readonlinelink" is a Typoscript Object Path in Templavoila. But now I wish to change that field in to a "Link field", so that editors can set the value of this field in the page properties' Extended tab. But if it's not set - the value of getIndpEnv:TYPO3_REQUEST_URL should be used.

So:
If the "Link field" is set - use that value for the typolink.parameter.data
If not - use getIndpEnv:TYPO3_REQUEST_URL

Can anyone help me with figuring out the Typoscript to do this?

Thanks in advance!
-- 
Kind regards,

Søren Madsen



More information about the TYPO3-english mailing list