[TYPO3] templavoila: rewrite link path

Dmitry Dulepov [typo3] dmitry at typo3.org
Fri Jun 13 05:28:16 CEST 2008


Hi!

Please, ask TV questions in TV list.

Matyi Gábor wrote:
> After I map this template with templatevoila, I experienced, that the 
> link are rewritten in the result.
> 
> instead of <img src="images/image1.jpg"> I get <img 
> src="fileadmin/templates/1234/images/image1.jpg"> it is normal.
> 
> but the css links are not rewritten. Of course the images/image3.jpg url 
> path has to be the same, but the <td 
> background-image:url(images/image2.jpg)> has to be rewrite to <td 
> background-image:url(fileadmin/templates/1234/images/image2.jpg)> -this 
> is my exprerience.

No, it's not ;)

> my question, why the templatevoila doesn't rewrite the url path, if it 
> is en embedded css style code in a html file?

Because these paths are relative to CSS file. CSS specification says (http://www.w3.org/TR/REC-CSS1#url):
"Partial URLs are interpreted relative to the source of the style sheet, not relative to the document"

So, if your CSS file is in fileadmin/templates/1234, then images/image2.jpg is correct path.

-- 
Dmitry Dulepov
E-mail: dmitry at typo3.org
Skype: callto:liels_bugs
TYPO3 technical: http://typo3bloke.net/


More information about the TYPO3-english mailing list