[TYPO3-mvc] More magic wishes: Nested viewhelpers?

Sebastian KurfŸürst sebastian at typo3.org
Thu Jun 4 09:53:19 CEST 2009


Hi Susanne,


> today seems to be my "wish" day *g*. I want to get the following to work:
> 
> <f:image
> src="typo3conf/ext/addresses/Resources/Private/Icons/v-vcard.png"
> alt="<f:translate key="download_vcard">Download as vCard</f:translate>"
> maxWidth="140" />
> 
> You see that I want to get a translated alt text from a language file.
> The above obviously doesn't work. Do you have an idea what could work?
I think it does not work because of the wrong quoting.
look especially at alt="<f:translate key="download_vcard">Download as 
vCard</f:translate>"

Try to use single quotes inside the alt="..." or escape the double 
quotes properly (by putting a backslash in front of it)

Alternatively, if you use Extbase/Fluid trunk, then you can use the 
shorthand syntax:

{f:translate(key='download_vcard')}

However, the stuff with the quotes applies here as well.

Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list