[TYPO3-dev] Adding additional information to file-links

Benjamin Seiller benjamin.seiller at antwerpes.de
Fri Jun 2 09:20:42 CEST 2006


We want to automatically add additional information to any
file-download-link, like the file size.
This information has to be added after / outside the link(-tag), it
mustn't be be part of the link itself.
Example:
<a href="somefolder/somefile.pdfDownload pdf </afilesize 0,8 MB

So it is not an (good) option to use extensions (like 'Different
Linklayout' - dh_linklayout) that are based on the TypoScript construct
  tt_content.text.20.parseFunc {
      tags.link.typolink.userFunc = tx_myExtension->linkManipulationFunction
  }
We are well aware of this possibility, but this construct only allows us
to manipulate the attributs of the <a>-tag itself, but not to manipulate
the following page-content or the link-text.

By now we see two possible options:
1. Define an own link-type, that can be pluged into the link-insertion
of the RTE_htmlarea (browse_links.php and 'userLinks') and that
    is rendered different from the 'normal' link-types.
2. Find a way to manipulate the html-rendering of the page-content after
normal file-links using typoScript and an extension.

If possible we would like to use the link-generation-mechanism of the
rte_htmlarea for link-input by the content-creator,
since this is much more user-friendly than a new content-type:
It gives the user the possibility to put such rich-links into the
continuous text without any special precautions

We would be glad for any hint (tutorials, examples, documentation
concerning hooks, etc.) that might help us to find a solution.
Also if there is completly different way to accomplish what is explained
above, please don't hesitate to tell us.

Thanks in advance for your trouble,

Benjamin

ps: Our second taks will be to automatically add another link after
every download-link, that allows the user to add the file to a
download-basket. But this can be done the same way as the file-size info...





More information about the TYPO3-dev mailing list