Question

When I create my menu I only have relative paths for the different menu links. How do I get an absolute URL (i.e. a typolink with the baseURL in front of it).

I can think of either defining a variable or write the domain name in the wrap. E.g.

10.wrap = <option value="http://www.domain.com/|">

But are there better options?

Était-ce utile?

La solution 2

Set config.absRefPrefix = http://www.yourdomain.com/sub/path/. That will prefix any properly generated site-root relative links with the domain.

There may be an alternative way using domain records (Linking across domains in multidomain-sites does exactly what you want), but I can't point you to anything there.

Autres conseils

Simply set the typolink parameter forceAbsoluteUrl of the links in your HMENU construct: http://wiki.typo3.org/TSref/typolink

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top