[TYPO3] Full URL in menu links

JoH info at cybercraft.de
Mon Aug 14 18:01:55 CEST 2006


> RealURL is meant to get nice looking URL's. That isn't what I'm
> looking for. I don't care (at least not yet) if the URL looks nice, I
> just want a full URL, not a local one.
>
> Maybe I should clarify why I want this, so it's more clear what I want
> exactly. The reason I need this is because one of our clients wants to
> use a payment service which can use remote templates. I want Typo3 to
> generate these templates, so the templates are the same as the website
> (menus, dynamic content, etc). Since the template will be rendered
> under a different domain (and different server) the links in the
> template need to be absolute (including domain name and path).
>
> If this isn't possible with Typo3, I'll just make a PHP script to
> fetch the template from Typo3 and use a regular expression to add the
> correct domain name and path to every relative link and image. It
> would be nice if this could be done with just Typo3, but I understand
> if it's not possible since it's a pretty unique situation.

NO {
    doNotLinkIt = 1
    stdWrap.typolink {
        parameter.dataWrap =
http://www.yourdomain.tld/index.php?id={TSFE:id}
    }
}

Disadvantage: Since external URLs are recognized based on http:// you won't
get the linkVars processed automatically. So you might try to add at least
the current parameters of a page like this (don't know if it works though)

NO {
    doNotLinkIt = 1
    stdWrap.typolink {
        parameter.dataWrap =
http://www.yourdomain.tld/index.php?id={TSFE:id}
        addQueryString = 1
    }
}
or you can try to wrap the a-tag inluciding the domain around the URL after
creating it like this:

NO {
    doNotLinkIt = 1
    stdWrap.override.cObject = TEXT
    stdWrap.override.cObject {
        field = title
        outerWrap.cObject = COA
        outerWrap.cObject {
            10 = TEXT
            10.value = <a href="http://www.yourdomain.tld/
            20 = TEXT
            20 {
                typolink {
                    parameter.data = TSFE:id
                    returnLast = URL
                }
            }
            30 = TEXT
            30.value = " class="menulink">|</a>
        }
    }
}

Should be enough to choose from ;-)

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com





More information about the TYPO3-english mailing list