[TYPO3] How to wrap only the url

Christopher Torgalson bedlamhotel at gmail.com
Mon Dec 18 18:18:24 CET 2006


On 12/18/06, Søren Vedel <sv at workhouse.dk> wrote:
> Thanks,
>
> Good idea, and it works. I will try if I can make this work. You're
> right about the usability issue. Actually I need a rollover on a table
> with 4 columns and each row has ONE link, and it could be nice to be
> able to click anywhere in this row without having to link each td-cell.
>
> My 'dirty' approach does this if I hardcode it, and I have done it in an
> extension that I use in this project, but I don't know how to write a
> sitemap-extension, so that's why I try the TypoScript way.
>


TMENU has no problem doing what you're after; without writing out the
whole menu, you need to do something like this in
lib.someMenuObject.1.NO:

# If I remember correctly, using stdWrap.cObject will remove the
# auto-generated TMENU link--if it doesn't, TMENU has a property
# called 'doNotShowLink' that you can use to remove it.
#
# The following code builds the table row (though I didn't see from your
# sample what to do about adding td/th in the row and closing the row):
stdWrap.cObject = HTML
stdWrap.cObject {
  value {
    # Get the page title
    data = field:title

    # Get the url:
    typolink {
      parameter.data = field:uid
      returnLast = url

      # Wrap the url:
      wrap = <tr onmouseover="'doThis'" onmouseout="'doThat'"
onmousedown="window.location = ' | '">
    }
  }
}

-- 
Christopher Torgalson


More information about the TYPO3-english mailing list