[Typo3] typolink and adding the tstamp in the title tag...

Ries van Twisk typo3 at rvt.dds.nl
Wed Sep 28 01:27:06 CEST 2005


Ries van Twisk wrote:

>Hey List,
>
>maby some typo guru can solve it....
>
>I have this typoscript whoch is part if a large piece of TS that get's 
>the most 10 updated page in part of my tree:
>
>    renderObj = COA
>    renderObj {
>      10 = TEXT
>      10.field = header
>      10.typolink.parameter.field=pid
>      10.typolink.parameter.stdWrap.dataWrap=#uid
>      10.wrap = <div class="style1 style4 style6">|
>     
>      20 = TEXT
>      20.field = tstamp
>      20.strftime = %d-%b-'%y %H:%M
>      20.wrap =  | </div>
>    }
>
>
>But how can I make sure that I add a title for the typolink that show 
>the tstamp file like I add the tstamp file after the link.
>
>I have tried several permutations (not shown here) but just cannot get 
>what I want.
>
>ATagParams doesn't seem to be stdWrap so I can't do anything there...
>
>Ries
>
>  
>
Hey Ries,
How are you doing?

Here is my own answer...

I had to 'hack' it with php cauze I couldn't find the route in typocrypt 
to answer my own question,
here it is:

    renderObj = COA
    renderObj {
      10 = TEXT
      10.field = title
      10.typolink.parameter.field=uid
      10.typolink.parameter.stdWrap.dataWrap=#uid
      10.typolink.userFunc = tx_ltgextendedmenus_pi1->ts_addTitletag
      10.wrap = <div class="style1 style4 style6">|</div>
    }

Where the function looks like this:
    function ts_addTitletag ($content) {
        $crdate = strftime ('%d-%b-%Y %H:%M', $this->cObj->data['crdate']);
        return '<a 
href="'.$content["url"].'"'.$content["targetParams"].$content["aTagParams"].' 
title="'.$this->cObj->data['title'].' was created on:'.$crdate.'>';
    }

Cheers,
Ries



More information about the TYPO3-english mailing list