[Typo3] Insert "Uploads" via Typoscript?

Philipp Fleischmann phf at gmx.at
Wed Mar 2 00:53:55 CET 2005


Hi list

I want to do the following: I want to have a TS Template for a portion of my site that generates something similar to the "Uploads" plugin automatically from the first media file (should be a pdf) associated with the page. So users can simply insert a new site of the type "Advanced", associate a media file and the Template generates the uploads - type appearence. I was able to do this with the TS I posted below. But: Its not a really beautiful solution because it does only work when the media file is stored in uploads/media/ by the user, and it does not show the filesize. Is there a better solution to this? Can I insert an "Uploads"-Content element by TS and set the first media file as the one to be displayed?


- Philipp Fleischmann (slp-web)

temp.zeitung-vorschau = IMAGE
temp.zeitung-vorschau {
file {
import = uploads/media/
import.field = media
import.listNum = 0
width = 150
}
}
# before.cObject = TEXT
#before.cObject.field = media
#before.cObject.listNum = 0
#beforeWrap = | - 
#allWrap = |<br>

temp.zeitung-filetitle = TEXT
temp.zeitung-filetitle.field = media
temp.zeitung-filetitle.listNum = 0


temp.zeitungs-inhalt < styles.content.get
temp.zeitungs-inhalt.select.pidInList = 41

temp.zeitungs-abo-werbung < styles.content.getRight
temp.zeitungs-abo-werbung.select.pidInList = 41

page.10.subparts.rechtesfeld = COA
page.10.subparts.rechtesfeld.10 < temp.zeitungs-abo-werbung
page.10.subparts.rechtesfeld.20 < styles.content.getRight

page.10.subparts.hauptfeld.subparts.zweispaltig = COA
page.10.subparts.hauptfeld.subparts.zweispaltig {
#1 = TEXT
#1.filelink {
#      path = uploads/media/
  #    icon = 1
    #  icon.wrap = <td> | </td>
#      size = 1
  #    size.wrap = <td> | </td>
    #  file.wrap = <td> | </td>
#      jumpurl = 0
  #    target = _blank
    #  stdWrap = <tr> | </tr>
#    }
10 = TEXT
10.field = title
10.dataWrap = <div class="csc-header csc-header-n1"><h1 class="csc-firstHeader"> | </h1></div><table bgcolor="#DEDEDE" class="csc-uploads csc-uploads-3"><tr class="tr-even"><td class="csc-uploads-icon"><a href="/typo3/uploads/media/
20 < temp.zeitung-filetitle
30 = TEXT
30.value =" target="_blank">
40 < temp.zeitung-vorschau
50 = TEXT
50.value = </a></td><td class="csc-uploads-fileName"><p><a href="/typo3/uploads/media/

60 < temp.zeitung-filetitle

70 = TEXT
70.value =" target="_blank">

80 < temp.zeitung-filetitle

90 = TEXT
90.value = </a></p></td></tr></table>

100 < temp.zeitungs-inhalt
110 < styles.content.get

}

-----------------------
The mailing list archive is found here:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/
				



More information about the TYPO3-english mailing list