[TYPO3-dev] BACK_PATH

Steffen Kamper info at sk-typo3.de
Wed Oct 29 19:56:09 CET 2008


Hi,

Dmitry Dulepov schrieb:
> Hi!
> 
> Martin Kutschker wrote:
>> BACK_PATH sucks. mod.php is better but it's only a sad little wrapper
>> that includes the module script. More fun would be if a module is a
>> class that implements a certain interface.
> 
> It will not be enough... Currently BACK_PATH must be set for
> init.php to work. I actually never understood it. It is always
> possible to find the back path. It should be perfectly traceable
> from the current URL. If URL looks like
> /typo3/extkey/module1/whateverelse/index.php, nothing prevents TYPO3
> from calculating the back path. Patch should take TYPO3_mainDir into
> account.
> 
> Even now BACK_PATH should not be necessary because we have
> t3lib_div::getIndpEnv('TYPO3_SITE_URL').
> 
> Probably BACK_PATH is just a relic from old good times.
> 

I had a look to mod.php, it doesn't look like the better solution.
So let's get rid of BACK_PATH :-)

Mostly BACK_PATH is used for the right link to typo3-dir, so naming is 
wrong too - its more a BACK_URL. Then we get this very nice urls like
../../../../typo3/../typo3conf/ etc.
There is something that helps to calculate url to main site:
t3lib_div::getIndpEnv['TYPO3_SITE_URL']
add 'typo3/' and we're done.

vg Steffen




More information about the TYPO3-dev mailing list