Antwort
 
LinkBack Themen-Optionen Thema bewerten Ansicht
  #1  
Alt 04.09.07, 14:14
Benutzerbild von maxhb
TYPO3 Forum Team
Moderator
 
Registriert seit: 19.08.04
Ort: Bremen
Alter: 37
Beiträge: 1.547

Dateigröße bei Dateilinks anzeigen


Hi!
Ich versuche gerade das Inhaltselement Dateilinks zu formatieren, es soll jeweils ein Icon für den Dateityp, der verlinkte Beschreibungstext und die Dateigröße angegeben werden.

Leider scheitere ich momentan schon an der Anpassung der Beschriftung.
Typoscript-Code:
1:
tt_content.uploads.20.3.split.1.filelink.size.bytes.labels =  Byte| kB| MB| GB
Damit sollten eigentlich die Bezeichnungen für die Einheiten angepasst werden, es passiert jedoch nichts...

Hat das schon mal jemand ausprobiert und weiss ggf. sogar, wie man den verlinkten Text (Beschreibung statt Dateiname) anpasst?!

CU
maxhb
__________________
FreeBSD || MySQL 5.x || TYPO3 3.6 - 4.2

Meine Stadt, meine Firma, mein Redaktionssystem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #2  
Alt 04.09.07, 14:51
Benutzerbild von maxhb
TYPO3 Forum Team
Moderator
 
Registriert seit: 19.08.04
Ort: Bremen
Alter: 37
Beiträge: 1.547

Hi!
Habe nun herausgefunden, dass der oben beschriebene Weg nicht für css_styled_content funktioniert.

Man kann sich dann mit folgendem Ansatz helfen:

Constants:
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
styles.content.uploads {
  # cat=content/cUploads; type=wrap; label= Wrap: Wrap for content element "Filelinks"
wrap = <b> | </b>
labelWrap =
sizeWrap =
tdWrap = |
  # cat=content/cUploads; type=wrap; label= Wrap, description: Wrap for the description of content element "Filelinks". If this is NOT set, the description will not shown up.
descriptionWrap =
jumpurl_secure =
jumpurl_secure_mimeTypes = pdf=application/pdf, doc=application/msword
jumpurl =
}

styles.content.tableStyle {
      # cat=content/cTable; type=color; label= Tables background color
color =
color1 =
color2 =
alignField =
}
Setup:
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
styles.content.uploads = TEXT
styles.content.uploads {
current = 1
override.filelist.field = select_key
trim = 1
required = 1
split {
token = ,
cObjNum = 1
1.current = 1
1.trim =1
1.filelink {
path = uploads/media/
path.override.field  = select_key
path.override.listNum = 0
path.override.listNum.splitChar = |
size = 1
size.wrap = {$styles.content.uploads.tdWrap}
size.innerWrap = &nbsp;&nbsp;&nbsp;
size.innerWrap2 = {$styles.content.uploads.sizeWrap}
size.fontTag = {$styles.content.uploads.wrap}
size.bytes = 1
size.if.isTrue.field = filelink_size
labelStdWrap.fontTag = {$styles.content.uploads.labelWrap}
file.fontTag = {$styles.content.uploads.wrap}
file.wrap = {$styles.content.uploads.tdWrap}
file.postCObject = TEXT
file.postCObject {
field = imagecaption
required = 1
if.directReturn = {$styles.content.uploads.descriptionWrap}
wrap = <br />{$styles.content.uploads.descriptionWrap}
listNum.stdWrap.data = register : SPLIT_COUNT
listNum.splitChar = 10
}
stdWrap.wrap =  | <br>
target = _blank
jumpurl = {$styles.content.uploads.jumpurl}
jumpurl.secure = {$styles.content.uploads.jumpurl_secure}
jumpurl.secure.mimeTypes = {$styles.content.uploads.jumpurl_secure_mimeTypes}
removePrependedNumbers = 1
}
}
tableStyle < styles.content.tableStyle    
}
styles.content.uploads_icons < styles.content.uploads
styles.content.uploads_icons.split.1.filelink {
icon = 1
icon.wrap2 = | &nbsp;&nbsp;
icon_link = 1
}
styles.content.uploads_imgicons < styles.content.uploads_icons
styles.content.uploads_imgicons.split.1.filelink {
icon_image_ext_list.data = global: TYPO3_CONF_VARS|GFX|imagefile_ext
icon.wrap = {$_blackBorderWrap}
}

  # tablestyle
styles.content.tableStyle {
align.field = {$styles.content.tableStyle.alignField}
border.field = table_border
cellspacing.field = table_cellspacing
cellpadding = 1
cellpadding.override.field = table_cellpadding

color.field = table_bgColor
color.default = {$styles.content.tableStyle.color}
color.1 = {$styles.content.tableStyle.color1}
color.2 = {$styles.content.tableStyle.color2}
}

# CType: uploads
tt_content.uploads >
tt_content.uploads = COA
tt_content.uploads {
10 = < lib.stdheader
20 = CASE
20 {
setCurrent.field = media
key.field = layout
default < styles.content.uploads
1 < styles.content.uploads_icons
2 < styles.content.uploads_imgicons
3 < styles.content.uploads_imgicons
3.split.1.filelink.icon.wrap >
}
20.stdWrap.editIcons = tt_content:media, layout [table_bgColor|table_border|table_cellspacing|table_cellpadding],filelink_size,imagecaption
20.stdWrap.editIcons.iconTitle=Edit filelist
}



tt_content.uploads.20.1.split.1.filelink.labelStdWrap.field = imagecaption
tt_content.uploads.20.1.split.1.filelink.labelStdWrap.listNum.stdWrap.data= register:SPLIT_COUNT
tt_content.uploads.20.1.split.1.filelink.labelStdWrap.listNum.splitChar = 10
tt_content.uploads.20.1.split.1.filelink.size.bytes.labels =  Byte| kB| MB| GB
Ein wenig umständlich, aber so klappt es!

CU
maxhb

P.S.: Man muss bei diesem Setup Layout1 in den Dateilinks verwenden
__________________
FreeBSD || MySQL 5.x || TYPO3 3.6 - 4.2

Meine Stadt, meine Firma, mein Redaktionssystem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Dateigröße bei Upload micha182 TYPO3 4.x Fragen und Probleme 2 28.06.08 10:30
Dateigröße ausgeben in FCEs lobby TemplaVoila 3 06.03.08 14:21
Gelöst ab_downloads dateigröße abgeschnitten haelje TYPO3 4.x Installation und Updates 3 29.02.08 22:35
Dateigröße für Upload via php.ini erhöhen vihringer TYPO3 4.x Fragen und Probleme 7 03.04.07 15:07
pdf_generator2 -> Dateigröße der PDFs DasNom Alle anderen Extensions 0 22.11.06 07:51


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:58 Uhr.


Powered by vBulletin® Version 3.7.3 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0