[Typo3-dev] Templa Voila - add option not to correct paths
dan frost
dan at danfrost.co.uk
Thu Apr 8 15:30:32 CEST 2004
Dear Templa Voila developers,
Is it possible to add a config option that stops the path being changed.
E.g. when, in my template, the path is /path/to/image.gif it is
corrected to /fileadmin/dir/path/to/image.gif.
This is ok for images, but breaks absolute links (e.g. "/contact/" in a
a-href using AliasPro) and also "to top" links.
The offending line is (i think) starting line 463:
if ($firstKey) {
$fileContent = t3lib_div::getUrl($this->displayFile);
$htmlParse = t3lib_div::makeInstance('t3lib_parsehtml');
$relPathFix =
dirname(substr($this->displayFile,strlen(PATH_site))).'/';
$fileContent =
$htmlParse->prefixResourcePath($relPathFix,$fileContent);
$this->markupObj =
t3lib_div::makeInstance('tx_templavoila_htmlmarkup');
$contentSplittedByMapping =
$this->markupObj->splitContentToMappingInfo($fileContent,$currentMappingInfo);
$templatemapping['MappingData_cached'] =
$contentSplittedByMapping['sub'][$firstKey];
}
The line:
$htmlParse->prefixResourcePath($relPathFix,$fileContent);
could have some sort of:
$config['fixPath']=1 ?
$htmlParse->prefixResourcePath($relPathFix,$fileContent) : 0;
Regards,
Dan
More information about the TYPO3-dev
mailing list