[TYPO3-dev] Path problem with $TBE_STYLES['htmlTemplates']['templates/db_layout.html']
Tapio Markula
tapio.markula at xetpoint.fi
Mon Jul 14 17:24:15 CEST 2008
Hi
Setting $TBE_STYLES['htmlTemplates']['templates/db_layout.html']
in a skin plugin has a path problem.
Path is normally
$templatedir='../'.$temp_eP.'htmlTemplates/';
where $temp_eP = t3lib_extMgm::extRelPath('skin_grey_2');
BUT this doesn't work if Typo3 has been installed into a subdirectory
A hack might solve that
$templatedir='../'.$temp_eP.'htmlTemplates/';
if(!is_dir(PATH_site .substr($templatedir,6))) // if installed into
subdirectory must add '../'
$templatedir='../../'.$temp_eP.'htmlTemplates/';
if(is_dir(PATH_site .substr($templatedir,6))) { // directory might not
be found if Typo3 has been installed into a subdirectory
$TBE_STYLES['htmlTemplates']['templates/db_layout.html']=$templatedir.'db_layout.html';
But is there a better solution
More information about the TYPO3-dev
mailing list