[TYPO3-dev] Path problem with $TBE_STYLES['htmlTemplates']['templates/db_layout.html']
Tapio Markula
tapio.markula at xetpoint.fi
Fri Jul 25 22:43:48 CEST 2008
Tapio Markula
> 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
this is really nasty - $TBE_STYLES['htmlTemplates'] has problems always
when Typo3 is not installed into main domain - all subdomain
installations fails.
More information about the TYPO3-dev
mailing list