[TYPO3-UG CH] Generating the RealURL href part of a Typolink

Xavier Perseguers typo3 at perseguers.ch
Thu Jan 17 11:33:41 CET 2008


Hi there,

I use TemplaVoila and RealURL. I mapped a few links on image from my template using TS object path to the HREF parameter of their links:

In my template:

<a id="link_1" href="..." onmousehover="..." onmouseout="..."><img src="..." alt="" /></a>
<a id="link_2" href="..." onmousehover="..." onmouseout="..."><img src="..." alt="" /></a>

So I have lib.links.link_1 mapped to #link_1:href and lib.links.link_2 mapped to #link_2:href.

The links should go to some specific pages whose PID are known. Now I use following TS to assign them a value (btw I use constants but that's not a problem):

lib.links.link_1 = TEXT
lib.links.link_1.value = /index.php?id=5

lib.links.link_2 = TEXT
lib.links.link_2.value = /index.php?id=27

This works! But I wish I could get a nicer URL as I am using RealURL. I could of course hard-code the speaking URL part RealURL generates for my page:

lib.links.link_1 = TEXT
lib.links.link_1.value = /my-videos.html

lib.links.link_2 = TEXT
lib.links.link_2.value = /my-photos.html

But if I could in some way generate a standard typolink without the <a> stuff which is then passed to RealURL, well-transformed and then put back in my href parameter, I would be happier. Something based on that:

lib.links.link_1 = TEXT
lib.links.link_1 {
  value = USELESS
  typolink {
    parameter = 5
  }
}

where I could extract the generated href part.

Is there any way with TS? I know how I could hook a custom function and write it by searching the corresponding records in the DB but that's more a general question about what is possible with pure TS.

Thanks
Xavier


More information about the TYPO3-ch mailing list