[TYPO3-dev] Scheme enforcement in 4.5.x
Jigal van Hemert
jigal at xs4all.nl
Thu Dec 8 22:05:42 CET 2011
Hi,
I've looked a bit at the code to see what is possible without too much
impact on performance.
The problem is that it is not possible to set the protocol for a
(sub)tree. We can't look at the TS configuration of the target page or
even the rootline of the target page; that would cost too much.
If we add the possibility to inherit the protocol setting (in the page
properties) to subpages it would be possible to set it for a (sub)tree.
Currently the page properties have three options for the protocol:
- <empty> : use same as page where link is (using relative URLs)
- http : force http
- https : force https
I propose to add a new setting:
- no protocol : force to not use a protocol (using relative URLs)
Furthermore a config setting:
config.typolinkInheritProtocol (bool)
If this is set the <empty> setting will copy the setting from the parent
page of the target page. This requires a rootline check, but this is
relatively cheap (a lot cheaper than parsing TS of the target page).
If this is not set (default) the 'no protocol' setting will have the
same effect as the <empty> setting.
The result is backwards compatible (no change if typolinkInheritProtocol
= 0), with the option enabled there is a slight performance loss but you
can force a protocol for a (sub)tree and even un-force it for some pages.
What do you think?
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
More information about the TYPO3-dev
mailing list