[Typo3] TemplaVoila: FlexContent Element File-Download
Gregor Kaczmarczyk
gregor at crazes.de
Tue Sep 13 16:08:12 CEST 2005
hi group,
just started using flexforms and it´s really a fast and intuitive approach
for building templates and content elements.
Now i need a FlexContent-element for file-downloads. (only 1 file per element)
I mapped with TemplaVoila the "src"-attribute from <a> to a link-field in my
HTML-template (files from fileadmin can be selected and will be showed in
FE). this works!
now i need some additional (automatical) information for the selected file
in FE (in BE-masks it would be a nice to have).
the fields are:
file-size,
file modification date,
author (name of BE-user, who edited the FlexContent-element)
that´s my DS XML until now:
<T3DataStructure>
<ROOT type="array">
<tx_templavoila type="array">
<title>ROOT</title>
<description>Select the HTML element on the page which you want
to be the overall container element for the template.</description>
</tx_templavoila>
<type>array</type>
<el type="array">
<field_file_name type="array">
<tx_templavoila type="array">
<title>File-Name</title>
<sample_data type="array">
<numIndex index="0">File-Name</numIndex>
</sample_data>
<eType>input</eType>
<proc type="array">
<HSC type="integer">1</HSC>
</proc>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>input</type>
<size>48</size>
<eval>trim</eval>
</config>
<label>File-Name</label>
</TCEforms>
</field_file_name>
<field_file_link type="array">
<type>attr</type>
<tx_templavoila type="array">
<title>File-Link</title>
<sample_data type="array">
<numIndex index="0">File-Link</numIndex>
</sample_data>
<eType>link</eType>
<TypoScript>
10 = TEXT
10.typolink.parameter.current = 1
10.typolink.returnLast = url
</TypoScript>
<proc type="array">
<HSC type="integer">1</HSC>
</proc>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>input</type>
<size>15</size>
<max>256</max>
<checkbox></checkbox>
<eval>trim</eval>
<wizards type="array">
<_PADDING type="integer">2</_PADDING>
<link type="array">
<type>popup</type>
<title>Link</title>
<icon>link_popup.gif</icon>
<script>browse_links.php?mode=wizard</script>
<JSopenParams>height=300,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
</link>
</wizards>
</config>
<label>Datei-Link</label>
</TCEforms>
</field_file_link>
<field_file_header type="array">
<tx_templavoila type="array">
<title>Header</title>
<sample_data type="array">
<numIndex index="0">Header</numIndex>
</sample_data>
<eType>input</eType>
<proc type="array">
<HSC type="integer">1</HSC>
</proc>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>input</type>
<size>48</size>
<eval>trim</eval>
</config>
<label>Header</label>
</TCEforms>
</field_file_header>
<field_file_description type="array">
<tx_templavoila type="array">
<title>Description</title>
<sample_data type="array">
<numIndex index="0">Description</numIndex>
</sample_data>
<eType>text</eType>
<proc type="array">
<HSC type="integer">0</HSC>
</proc>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>text</type>
<cols>48</cols>
<rows>5</rows>
</config>
<label>Description</label>
<defaultExtras>richtext[*]:rte_transform[mode=css]</defaultExtras>
</TCEforms>
</field_file_description>
<field_file_size type="array">
<tx_templavoila type="array">
<title>File-Size</title>
<sample_data type="array">
<numIndex index="0">1.400 KB</numIndex>
</sample_data>
<eType>input</eType>
<proc type="array">
<HSC type="integer">1</HSC>
</proc>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>input</type>
<size>48</size>
<eval>trim</eval>
</config>
<label>File-Size</label>
</TCEforms>
</field_file_size>
<field_file_author type="array">
<tx_templavoila type="array">
<title>Author</title>
<sample_data type="array">
<numIndex index="0">Author</numIndex>
</sample_data>
<eType>input</eType>
<proc type="array">
<HSC type="integer">1</HSC>
</proc>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>input</type>
<size>48</size>
<eval>trim</eval>
</config>
<label>Author</label>
</TCEforms>
</field_file_author>
<field_file_changed type="array">
<tx_templavoila type="array">
<title>Last modification</title>
<sample_data type="array">
<numIndex index="0">24.12.2005</numIndex>
</sample_data>
<eType>input</eType>
<proc type="array">
<HSC type="integer">1</HSC>
</proc>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>input</type>
<size>48</size>
<eval>trim</eval>
</config>
<label>Last modification</label>
</TCEforms>
</field_file_changed>
</el>
</ROOT>
</T3DataStructure>
i hope some of you has an idea how this additional values can be retrieved.
thx in advance.
ciao, greg
More information about the TYPO3-english
mailing list