[TYPO3] Cooluri - anybody using page type "mount point"?
Steffen Gebert
steffen at steffen-gebert.de
Sun Jul 27 22:37:16 CEST 2008
Hi Jan
> I'm not really familiar with MP (never used it)
Me too :-[
Okay.. My patch uses $_SERVER['SERVER_NAME'] if linkVars contains &MP=
instead of calling getDomain.
By putting MP to CoolUriConf.xml predefined parts it's also possible to hide
MP-var in URLs :) (just mentioned because it's nice).
The only problem I just found is with hardcoded links like
http://www.example.com/index.php?id=xxx with xxx is a page of another
domain.
Usually they should be correctly redirected to the other domain - this is
not the case here, so I still have to do some research on this.
But so far, the following patch works nice:
diff cooluri/class.tx_cooluri.php cooluri-mp-patch/class.tx_cooluri.php
188c188,191
< if (empty(Link_Translate::$conf->cache->prefix)) {
---
> /* if page type "mount point" is used, we can't return the domain of
the mounted page - instead we use current domain */
> if (strstr($params['LD']['linkVars'], '&MP=')) {
> Link_Translate::$conf->cache->prefix =
$_SERVER['SERVER_NAME'].'@';
> } elseif (empty(Link_Translate::$conf->cache->prefix)) {
Comments are welcome!
Steffen
More information about the TYPO3-english
mailing list