[TYPO3] relative path mistaken
Arpad Muranyi
pesz at pesz.hu
Wed Jul 16 12:01:32 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
And would it reference to www.myurl.com even if i made a subdomain like
dev.myurl.com?
> 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).
Will consider if i need more css modification, but for now for me it is
easier to apply the whole url in this page.CSS_inlineStyle, and
certainly it works perfectly - until i move the whole installation to
the final server, and perhaps forget removing the part in front of
fileadmin :)
and one more problem, since i apply baseURL this TS setup does reference
to the top of the root page regardless which page it belongs to
tt_content.stdWrap.innerWrap2 (
|<a href="#header" class="top" target="_self">to the top</a>
)
arpad
More information about the TYPO3-english
mailing list