[Typo3] Escaping a character in TS

JoH info at cybercraft.de
Mon May 2 12:28:04 CEST 2005


> How can one escape a character in TS? I need to have a { sign in the
> output, but this is not possible without escaping the character.
>
> I have a line:
>
> temp.menubg.value = <style><!-- td#menu { background-image:
> url(/fileadmin/images/sitebg/{page:title}.png); } --></style>
>
> temp.menubg.value.insertData = 1
>
> Which leads to:
> <style><!-- td#menu .png); } --></style>

No escaping needed. Do it like this:

temp.menubg.data = page:title
temp.menubg.wrap = <style><!-- td#menu { background-image:
url(/fileadmin/images/sitebg/|.png); } --></style>

BTW: There is the possibility to attach images directly to pages of type
"advanced". This way you don't have to take care of the names of uploaded
images and they will stick to the pages, when you copy or rename them. They
can be used using "import" and the path "uploads/media". Do a search for
these and you will find lots of examples.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list