tags:

views:

387

answers:

2

Is there an alternative way of getting the URL to a page (by id) apart from using cObj->getTypoLink_URL?

I'm trying to create URL aliases, so a page can have multiple URLs (for example "/about" could actually point to "/corporate/home/about").

I'm currently hooking into realurl's hook decodeSpURL_preProc, but TSFE and cObj are not initialised at that point therefore calling cObj->getTypoLink_URL doesn't work.

I should add that the url alias should not redirect to the original url.

+1  A: 

If you create RealURL aliases("Redirects"), you can create a database query that fetchs the url aliases, you have created.

Have a look in the realurl redirects table.

brainfck
the redirects table still needs the destination, so I would hit the same problem (not being able to generate the original page url). Also, realurl redirects to the alias, I'm trying to mask it (show the same page on 2 urls without redirecting).
Andrei Serdeliuc
A: 

I would recommend creating links in the backend (We usually have a menu separator, and all the links below). That way you're more flexible and TYPO3 will keep track of them so it's not publishing duplicate content (which might be bad for SEO).

freddy K.