[TYPO3-english] tt_address and userFunc to generate realURL?
Martin Mädler
martin.maedler at rwth-aachen.de
Mon Mar 14 15:02:55 CET 2011
Hello,
I'm using my own template to output the address data.
My TS looks something like this:
plugin.tx_ttaddress_pi1 {
templates.address_list >
templates.address_list {
wrap = <p>|</p>
first_name.wrap = <em>|
last_name.wrap = |</em>
# ...
}
}
and the template roughly looks like this
<!-- ###TEMPLATE_ADDRESS### beginn -->
<div class="vcard">
###FIRSTNAME### ###LASTNAME######PHONE######EMAIL###
</div>
<!-- ###TEMPLATE_ADDRESS### end -->
I want the firstname and the lastname to be wrapped in a link and
generate the url using a using a userFunc taking two arguments,
first_name and last_name.
*Example*
Input: arg1: "Thomas", arg2: "Müller"
Output: <a href="team/thomas-mueller/">Thomas Müller</a>
But I have no idea how I can tell TYPO3 to use my custom function to
generate that link. Is that even possible? Is this a bad idea?
All I could come up with is this so far is this, which prints out the
return string of my function at the end of the webpage.
includeLibs.test = fileadmin/user_link.php
temp.info = USER
temp.info {
userFunc = user_link->main
arg1 = Thomas
arg2 = Müller
}
page = PAGE
page.50 < temp.info
Thank you
Martin
More information about the TYPO3-english
mailing list