[TYPO3] relative path mistaken

Xavier Perseguers typo3 at perseguers.ch
Tue Jul 15 23:41:50 CEST 2008


Hi,

>> config.baseURL = http://www.mydomain.com/dev/
>>
>> http:// and ending slash are important.
> 
> strange. i have already applied it this way but when i try modifying 
> header image in TS setup, this way:
> 
> page.CSS_inlineStyle (
>     div #header { background-image: 
> url('/fileadmin/template/main/img/header_eng.png'); }
> )

This is not a problem in TYPO3 but with the way you reference the file. 
Asking a file whose path starts with a slash will try to include it from 
root of the domain, not root of your current install. TYPO3 has nothing 
to do with that. You should use a real CSS, not an inlined one and 
reference the background image relative to the CSS file location or 
generate the page.CSS_inlineStyle inlined with a small TS that creates 
the file (read post TSFE:lastImageInfo and GIFBUILDER, you'll have all 
what you need).

HTH

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-english mailing list