DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
Browser Tutorial Download Module (en)¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed by: | Dirk Wildt |
Changed: | 2012-05-17T04:09:46 |
Classification: | browser_tut_downloads_en |
Description: | Manage your downloads with the Browser! The Browser takes care of user access rights. It is counting hits and visits for downloaded files. The statistics data is the basis for displaying most frequented records and files. Top 10 lists are a typical example. |
Keywords: | forDevelopers, forIntegrators, browser, downloads, download, module, tutorial, frontend-engine |
Author: | Dirk Wildt, Die Netzmacher |
Email: | http://wildt.at.die-netzmacher.de |
Website: | http://die-netzmacher.de |
Language: | en |
extKey: browser_tut_downloads_en
Browser Tutorial Download Module (en)¶
Manage your downloads with the Browser! The Browser takes care of user access rights. It is counting hits and visits for downloaded files. The statistics data is the basis for displaying most frequented records and files. Top 10 lists are a typical example.
Version: 3.9.14, 2012-05-14 - Version is corresponding with the version of the Browser.
Extension Key: browser_tut_downloads_en - Tutorial for the extension Browser (extkey: browser)
Language: en
Keywords: forDevelopers, forIntegrators, browser, downloads, download, module, tutorial, frontend-engine
Copyright 2011-2012, Dirk Wildt, Die Netzmacher, <http://wildt.at.die- netzmacher.de>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.org
Table of Contents¶
Browser Tutorial Download Module (en) 1
What does the Browser Download Module do? 5
When do you need the Browser module? 5
What doesn't the Browser Download Module not do? 6
TYPO3 Browser Download Module 7
Use the download module for your own extension 15
Page, Template, Plugin – 1/2 17
Screen Shots¶
Frontend¶
typo3-organiser.de¶
Organiser (org) is based on the TYPO3 Browser. It is using the download module among others. You can install the Organiser with one click – ready to go. Configuration is finished. It contains the records like in the illustration above.
leg-thueringen.de¶
The example above is based on Organiser (org)
Introduction¶
What does the Tutorial do?¶
This is a tutorial for the extension Browser Download Module (extkey: browser_downloads_en).
It is only
a tutorial for the Browser Download Module.
It does
- explain the work flow of the Browser Download Module,
- document the needed requirements and
- teach, how to install and configure the Download Module for your own extension and your own needs.
If you are interested in other issues than the download module, please note the section "Further Informations" below.
What does the Browser Download Module do?¶
The Browser Download Module manages the frontend rendering of downloads. Features are
- automatic thumbnail rendering
- automatic calculating of the file size
- statistics data (the basis for top 10 lists)
- a sophisticated user access management
- search engine optimisation
- displaying download links for the origin file and all translated files
- a sophisticated client application management depending on the mime- type of the file
- a sample for DAM. You can use DAM from the scratch.
The Browser Download Module is localised.
The Browser Download Module enables you
to use files of every database like DAM, Organiser, tt_news or your own database.
Properties will be configured in both flexforms:
- the flexform for editing the record. Properties depends on the used extension like DAM, Organiser, tt_news or your extension.
- the flexform of the TYPO3 Browser plugin.
The frontend engine of the module is based on tt_content.uploads.20. tt_content.uploads.20 is part of the TYPO3 system extension "CSS styled content" (css_styled_content). It is a very good standard. If you are familiar to tt_content.uploads, it should be easy to adapt the TypoScript to your needs.
You can categorise files. This depends on your database design.
If you like to use the TYPO3 Browser Download Module, your job is to configure the backend for your database (ext_tables.sql and tca.php) and to configure the frontend by TypoScript.
The extension Organiser (org) is using the TYPO3 Browser Download Module. There is a live example on
The TYPO3 Browser has a forum. See "Forum" on page 32 below.
When do you need the Browser module?¶
The standard of extension development is, that you have to take care of the output of your data. It is simple to code to offer documents for downloading – but with a link to the document only.
You can need the Browser Download module, if you have this needs:
- A thumbnail should link from the list view to the single view of the record
- A thumbnail should link in the single view for downloading the document, but URL shouldn't be the URL to the document directly.
- Documents should controlled by access rights.
- Downloads should counted for statistic data.
- And this can be a need to: You are lazy and don't like to code the download management by your self.
What doesn't the Browser Download Module not do?¶
- The Browser Download Module isn't any application out of the box.
- The Browser Download Module is different to every known download application or file management application: the module hasn't any own database.
What do you need?¶
- The Browser from version 4.0 (developer version 3.9.14).
- A database, which manage your files in the TYPO3 backend.
- Knowledge about TypoScript.
Further Information¶
This tutorial in PDF format¶
You find this manual as PDF file at
User function: render_uploads¶
The Browser download module is using the user function render_uploads.
This function is documented in the manual
- Browser Tutorial User Defined Functions (en)See section "render_uploads"
- HTML http://typo3.org/documentation/document-library/extension- manuals/browser_tut_userfunc_en/current/
- PDF http://typo3-browser.de/typo3conf/ext/browser_tut_userfunc_en/ doc/manual.pdf
All Browser Manuals and Tutorials¶
You find all Browser manuals and tutorials at the home page of the Browser:
- English: http://typo3-browser.de/en/browser-tutorials/
- German: http://typo3-browser.de/browser-tutorials/
All manuals and tutorials are in English but the "Fall-Studie: Grüne Autos".
TYPO3 Browser Download Module¶
Workflow¶
The usual way without any application¶
The usual way to provide a file is a direct link like http://typo3-organiser.de/fileadmin/tx_org/my_file.pdf.
This has the advantage:
- You don't need a Content Management System (CMS) for the download.
- You won't have any SQL query.
- You will have a good performance.
But the dark side of the moon is:
- You can't count downloads with your CMS (here: TYPO3). You can't create top 10 lists for example.
- You can't manage user access rights with your CMS.
The usual way with a common application¶
There are some TYPO3 extensions, which support the management of files and downloads.
Some extensions are very powerful:
- some are localised
- some have support for statistics needs
- some support search engine optimisation
- some are meta management systems like DAM
But all extensions have the same concept:
- You have to manage your files with the database of the extension or of the meta management system.
- You have to publish your files with the plugin (PHP code) of the extension.
If you like to change the database or to extend it, you will have a lot of work – the truth is: it isn't possible in principle.
The way with the TYPO3 Browser Download Module¶
The base is your database (your extension) or any other extension, which manage the file upload in the TYPO3 backend. Or the base is an extensions, which are using the Browser Download Module – but this extensions are ready for use – like the Organiser (org)
The TYPO3 Browser is the frontend engine for your database: It takes care of the output like list views and single views, search forms, filters and category menus.
The Browser Download Module is part of the Browser.
The Module generates a link to a file, which points to the TYPO3 Browser plugin.
The Browser plugin handles this link.
It checks some conditions like user access rights among others.
It manages the statistics needs.
It provides the file and sends meta data like the mime-type.
Follow the work flow¶
You can follow the work flow of the Download Module. You have to enable the DRS – the Development Reporting System – in the extension manager of the TYPO3 Browser. You will get a lot of logs in the TYPO3 backend.
Access Management¶
Access will managed by the frontend user management of TYPO3.
- Anybody hasn't access to a file, if the record is hidden or marked as deleted, which contains this file.
- Anybody hasn't access, if he isn't logged in or isn't authorised, but the page or the Browser plugin has give access for a group of frontend users only,
You can switch on and switch off download access in principle by the Browser plugin.
Security¶
Checks¶
You can use the Browser plugin unlimited in your TYPO3 installation and unlimited on every page. The Browser plugin itself can manage views unlimited.
Therefore are the following needs for security:
- The Browser plugin has access to files only, if it is configured for file access. Not other plugin hasn't any access.
- The authorised Browser plugin has access for files for the view only, which is configured for file access.
Therefore you will get a link to a file like this one:
tx_browser_pi1[file]=single.301.tx_org_downloads.26.documents.0
Risks¶
Files can download by the direct link still! The user has to know the link only.
If files shouldn't downloaded directly, you have to manage the access to files on your server by your self.
Mime-types¶
The Browser allocates mime-types to files. This has the advantage, that most operating systems offer the application for viewing or editing the file before the download.
The mime-types are a property of TypoScript. If you want to change the allocation or if you like to extend it, please configure the TypoScript. See
plugin.tx_browser_pi1.download.mime-types.fileext
Samples – ready for use¶
DAM by Browser¶
The Browser provides a template for DAM – ready for use. You need the DAM extension only.
Does it make sense?
DAM is very powerful, but some user like it more simple in the frontend and more simple to adapt the database to their needs.
The Browser template for DAM is the result of the tutorial below. We take DAM for the tutorial, because it is well known and a standard for document access management in TYPO3.
Organiser¶
Organiser is a very young extension – published in 2011. But it is very powerful. It is the Swiss knife between the 5.500 extensions in the TYPO3 repository.
You can manage
- events
- locations
- media (download)
- news
- online tickets
- organisers and
- stuff
And you can install the Organiser with one click! It is ready for use with a lot of example data, a configured shopping cart and a download module among others.
Use the Browser for DAM!¶
Workflow¶
- Create a page, add a TypoScript template and add the Browser plugin.
- Configure the TypoScript template.
- Configure the TypoScript Constant Editor.
- Configure the plugin.
- Check the result in the frontend.
Requirements¶
Browser 4.x¶
You need the Browser from version 4.0.
DAM¶
You have to install Media DAM (dam)
Knowledge about TypoScript¶
Less.
Time¶
You will need from 10 minutes to 20 minutes. It depends on your knowledge about the Browser and TypoScript.
TypoScript¶
Template¶
- Add to your page a TypoScript extension template.
- Call it "+page_browserdam_217", if 217 is the id of your TypoScript template.
- Slect the tab [Includes]
- Add to the field "Include satic (from extensions):" the static
templates
- Browser (browser)
- +Browser Sample for DAM (browser)
TypoScript Constant Editor¶
Set the page uid to the uid of the page "Browser for DAM"
Modul: Web > Template
Page tree: page "Browser for DAM"
Edit area: [Constant Editor]
[BROWSER – DOWNLOAD MODULE]
page uid: the uid of the page "Browser for DAM"
Plugin¶
Add to your page the Browser flexform / plugin
Call it [Browser for DAM]
Set [Don't display any header]
Behaviour: Set the "Record Storage Page" to the folder with your DAM records. Usually it is called "Media".
Plugin > Templating: Set "HTML" to [+DAM: Sample (dam)]
If you have other views configured (in case you are still using the TYPO3 Browser for other projects) please configure:
Plugin > General
- Set "Views" to [Configured]
- Set "Views: Enabled list views, ..." to "37165: +DAM: Sample"
Plugin > General > Download: This plugin is permitted to handle the download page object.Set it to [Enabled]
Tutorial¶
Use the download module for your own extension¶
This tutorial present, how you are using the Browser Download Module for your own extension.
Tutorial is based on DAM¶
But because the author can't know your extension, this tutorial is based on DAM.
Workflow¶
- Get an HTML template and adapt it to your needs.
- Configure TypoScript 1/3 (test only)
- Create a page, add a TypoScript template and add the Browser plugin.
- Check the result in the frontend
- Configure TypoScript 2/3 (download template)
- Check the result in the frontend
- Configure TypoScript 3/3 (extend the download template)
- Check the result in the frontend
Requirements¶
If you like to follow this tutorial, this are the requirements.
Browser 4.x¶
You need the Browser from version 4.0.
DAM or your own database registered by the TCA¶
You can use the TYPO3 Browser Download Module with every database. There is one need only: the database has to be registered for the TCA – the Table Configuration Array. Every database of a TYPO3 extension is registered.
We take DAM for this tutorial.
This fields are needed
- record title
- file
- file description
- file caption
Optional are fields like
- an alternate thumbnail
- the size of the thumbnail
- statistics data
But the optional fields aren't part of this tutorial.
Knowledge about TypoScript¶
You should be familiar with TypoScript.
Time¶
You will need from 30 minutes to 2 hours. It depends on your knowledge about the Browser and TypoScript.
Purpose¶
List view¶
Each item should contain:
- filter for the category
- filter for the date of publishing
- title
- file with link to the single view
- caption
Single view¶
Each item should contain:
- title
- file with link for downloading
- caption
- description
- download size
- link for downloading
DAM¶
Install DAM¶
Install Media DAM (dam), if it isn't installed.
- Update the database.
- Update the DAM configuration (take all properties by default).
Scan files¶
- Modul MEDIA > Tools
- Edit area: Check index -> Check uploads > Send data
If DAM doesn't find any file, please upload three files and repeat the file scan.
Add Categories¶
Add two categories like
- books
- photos
or any others.
- Modul WEB > List
- Page tree: Folder Media (on top level)
- Edit area: Add records "Media Categories"
Check the result¶
- Modul WEB > List
- Page tree: Folder Media (on top level)
You should see some files and the categories at least.
Page, Template, Plugin – 1/2¶
Add to your Website a page
- call it "Browser DAM Sample".
- hide it in menus.
Add to your page a TypoScript extension template.
Call it "+page_browserdam_216", if 216 is the id of your TypoScript template.
Add to your page the Browser flexform / plugin
- Call it [Browser DAM Sample]
- Set [Don't display any header]
- Configure it later.
Intermediate Result¶
The illustration above displays the result in the backend.
The illustration above displays the result in the frontend.
You will get an error message. This would be OK! Don't care about it.
We will configure the Browser plugin later.
HTML Template¶
Copy the Browser default template¶
We copy the Browser default HTML template for unordered lists to a directory in our extension (or into the fileadmin).
cp typo3conf/ext/browser/res/html/default_ul.tmpl fileadmin/browser_dam_sample/default.html
Please adapt the destination path to your needs.
Edit the copy¶
List view¶
We are interested in the subpart of the marker ###LISTBODY### only (3 lines).
<ul><!-- ###LISTBODY### begin --><!-- ###LISTBODYITEM### begin -->
<li###CLASS###>### ITEM ### ###SOCIALMEDIA_BOOKMARKS###</li><!-- ###LISTBODYITEM### end -->
<!-- ###LISTBODY### end --></ul>
We replace the marker ###ITEM### with ###TX_DAM.TITLE###
<ul><!-- ###LISTBODY### begin --><!-- ###LISTBODYITEM### begin -->
<li###CLASS###>### TX_DAM.TITLE ### ###SOCIALMEDIA_BOOKMARKS###</li><!-- ###LISTBODYITEM### end -->
<!-- ###LISTBODY### end --></ul>
Single view¶
We are interested in the subpart of the marker ###SINGLEBODY###.
<!-- ###SINGLEBODY### begin -->
<h1 class="ui-widget-header ui-corner-top">
###TITLE###
</h1>
<div class="ui-widget-content ui-corner-bottom">
<dl style="font-size:.85em;">
<!-- ###SINGLEBODYROW### begin -->
<dt###CLASS###>
###FIELD###
</dt>
<dd###CLASS###>
###VALUE### ###SOCIALMEDIA_BOOKMARKS###
</dd>
<!-- ###SINGLEBODYROW### end -->
</dl>
</div>
<!-- ###AREA_FOR_AJAX_LIST_01### end -->
<!-- ###BACKBUTTON### begin -->
<p class="backbutton">
###BUTTON###
</p>
<!-- ###BACKBUTTON### end -->
<!-- ###AREA_FOR_AJAX_LIST_02### begin -->
<!-- ###SINGLEBODY### end -->
Remove all but the div with the class "ui-widget-content " between
- <!-- ###SINGLEBODY### begin --> and <!-- ###SINGLEBODYROW### begin -->
- <!-- ###SINGLEBODYROW### begin --> and <!-- ###SINGLEBODYROW### end -->
- <!-- ###SINGLEBODYROW### end --> and <!-- ###AREA_FOR_AJAX_LIST_01### end -->
Intermediate result:
<!-- ###SINGLEBODY### begin -->
<div class="ui-widget-content ui-corner-bottom">
<!-- ###SINGLEBODYROW### begin -->
<!-- ###SINGLEBODYROW### end -->
</div>
<!-- ###AREA_FOR_AJAX_LIST_01### end -->
<!-- ###BACKBUTTON### begin -->
<p class="backbutton">
###BUTTON###
</p>
<!-- ###BACKBUTTON### end -->
<!-- ###AREA_FOR_AJAX_LIST_02### begin -->
<!-- ###SINGLEBODY### end -->
Insert into <!-- ###SINGLEBODYROW### begin --> and <!-- ###SINGLEBODYROW### end --> ###TX_DAM.TITLE### ###SOCIALMEDIA_BOOKMARKS###
<!-- ###SINGLEBODY### begin -->
<div class="ui-widget-content ui-corner-bottom">
<!-- ###SINGLEBODYROW### begin -->
###TX_DAM.TITLE### ###SOCIALMEDIA_BOOKMARKS###
<!-- ###SINGLEBODYROW### end -->
</div>
<!-- ###AREA_FOR_AJAX_LIST_01### end -->
<!-- ###BACKBUTTON### begin -->
<p class="backbutton">
###BUTTON###
</p>
<!-- ###BACKBUTTON### end -->
<!-- ###AREA_FOR_AJAX_LIST_02### begin -->
<!-- ###SINGLEBODY### end -->
TypoScript – 1/3¶
We have to do this at least:
- Connect the Browser with our HTML template
- Get the tx_dam.title from the database.
- Integrate our HTML template and our TypoScript template into the flexform of the Browser
TypoScript snippet¶
plugin.tx_browser_pi1 {
template {
extensions {
dam {
sample {
// [String] Name of the template. It will displayed in the plugin/flexform
name = +DAM: Sample
file = fileadmin/browser_dam_sample/default.html
// [csv] Comma seperated list with the number of the correspondening views
csvViews = 37165
}
}
}
}
views {
list {
37165 = +DAM: Sample
37165 {
// [String] Name of the view. It will displayed in the plugin/flexform
name = +DAM: Sample
// [String] Select clause (don't confuse it with the SQL select)
select (
tx_dam.title
)
}
}
single {
37165 = +DAM: Sample
37165 {
// [String] Select clause (don't confuse it with the SQL select)
select (
tx_dam.title
)
}
}
}
}
Line 4-12: We register our templates in the flexform of the Browser.It
will appear in a selectbox with the name "+DAM: Sample"It will take
the HTML template from the given path.It is connected with the view
37165 :sup:`0
<#sdfootnote1sym>`_
Line 16-26: Our list viewIt is called "+DAM: SampleIt will query the database for the field tx_dam.title at runtime only.
Line 27-35: Same as list view
We copy our TypoScript snippet into the TypoScript template of the page "Browser DAM Sample".
Page, Template, Plugin – 2/2¶
Edit your TypoScript template "+page_browserdamsample_216"
- You have copied the TypoScript snippet form above into the field "Setup".
- Includes the static template (from extensions): "Browser (browser)"
Edit the Browser flexform / plugin "[Browser DAM Sample]"
Behaviour: Set the "Record Storage Page" to the folder with your DAM records. Usually it is called "Media".
Plugin > Templating: Set "HTML" to [+DAM: Sample (dam)]
If you have other views configured (in case you are still using the TYPO3 Browser for other projects) please configure:
Plugin > General
- Set "Views" to [Configured]
- Set "Views: Enabled list views, ..." to "37165: +DAM: Sample"
Plugin > General > Download: This plugin is permitted to handle the download page object.Set it to [Enabled]
TypoScript Template¶
Intermediate Result¶
The result in the frontend depends on your available files.
You should get a list view with tx_dam records labelled with the title. The list view contains
- a search form,
- an index browser,
- a field for sorting and
- a page browser, if you have more than 20 DAM records stored.
Unexpected result?¶
If there is any error or unexpected result:
- Please check the first tab [Plugin check] of the Browser flexform. Is there any helpful prompt?
- Please check, if you have followed the tutorial proper.
TypoScript – 2/3¶
The snippets as a file¶
You find the completely code snippet at
typo3conf/ext/browser/static/samples/dam/setup.txt
General¶
We don't like one default property (it is out of date): we remove general_stdWrap.
plugin.tx_browser_pi1.general_stdWrap >
See snippet below.
plugin.tx_browser_pi1 {
template {
...
}
// Don't use general_stdWrap!
general_stdWrap >
...
}
List view¶
The Browser uses "showUid" as label for the record uid in the URL. We like to change it to another name, which we will configure by the TYPO3 Constant Editor. We will explain it later. See:
plugin.tx_browser_pi1.views.list.37165.showUid
We add fields for the file name, the file path and the caption.
Please don't forget the comma after the first field tx_dam.title!
See
plugin.tx_browser_pi1.views.list.37165.select
We configure field per field.
See:
plugin.tx_browser_pi1.views.list.37165.tx_dam.title
Be aware of proper lines at tx_dam.title.20 and tx_dam.title.40.Property and value has to be one line!
tx_dam.title.20 < <- is wrong
plugin... <- is wrong
tx_dam.title.40 < <- is wrong
plugin... <- is wrong
tx_dam.title.20 < plugin... <- is proper
tx_dam.title.40 < plugin... <- is proper
- tx_dam.title.20 and tx_dam.title.40 get so called master templates. This save a lot of work for TYPO3 integrators and developers.
- The master templates contains some values, which depends on your configuration.
- You will maintain the values by the TYPO3 Constant Editor (see below).
If you are interested in the code of the templates, please inspect tx_dam.title.20 and tx_dam.title.40 with the TYPO3 Object Browser.
Code Snippet
plugin.tx_browser_pi1 {
...
views {
list {
37165 = +DAM: Sample
37165 {
...
showUid = {$plugin.tx_browser_pi1.downloadmodule.urlParam}
select (
tx_dam.title ,
tx_dam.file_name,
tx_dam.file_path,
tx_dam.caption
)
tx_dam {
title = COA
title {
10 = TEXT
10 {
value = <h2>###TX_DAM.TITLE###</h2>
}
20 < plugin.tx_browser_pi1.displayList.master_templates.modules.dow nload.thumbnails.withLinkToListView
30 = TEXT
30 {
value = <p>###TX_DAM.CAPTION###</p>
}
40 < plugin.tx_browser_pi1.displayList.master_templates.modules.dow nload.textlinks.withLinkToListView
90 = TEXT
90 {
value = <div style="clear:both;font-size:0;line- height:0;"> </div>
}
}
}
}
}
single {
...
}
}
}
Single view¶
The single view is the same like the list view in principle. It is more detailed. And links are links for downloading,
The Browser uses "showUid" as label for the record uid in the URL. We like to change it to another name, which we will configure by the TYPO3 Constant Editor. We will explain it later. See:
plugin.tx_browser_pi1.single.list.37165.showUid
We add fields for the file name, the file path and the caption.
Please don't forget the comma after the first field tx_dam.title!
See
plugin.tx_browser_pi1.single.list.37165.select
We configure field per field.
See:
plugin.tx_browser_pi1.single.list.37165.tx_dam.title
Be aware of proper lines at tx_dam.title.20 and tx_dam.title.40.Property and value has to be one line!
tx_dam.title.20 < <- is wrong
plugin... <- is wrong
tx_dam.title.40 < <- is wrong
plugin... <- is wrong
tx_dam.title.20 < plugin... <- is proper
tx_dam.title.40 < plugin... <- is proper
- tx_dam.title.20 and tx_dam.title.40 get so called master templates. This save a lot of work for TYPO3 integrators and developers.
- The master templates contains some values, which depends on your configuration.
- You will maintain the values by the TYPO3 Constant Editor (see below).
If you are interested in the code of the templates, please inspect tx_dam.title.20 and tx_dam.title.40 with the TYPO3 Object Browser.
Code Snippet
plugin.tx_browser_pi1 {
...
views {
...
single {
37165 = +DAM: Sample
37165 {
// [String] Parameter for the uid of the document in the URL
showUid = {$plugin.tx_browser_pi1.downloadmodule.urlParam}
select (
tx_dam.title ,
tx_dam.file_name,
tx_dam.file_path,
tx_dam.caption,
tx_dam.description,
tx_dam.date_mod,
tx_dam.file_size,
tx_dam_cat.title
)
tx_dam {
title = COA
title {
10 = TEXT
10 {
value = <h2>###TX_DAM.TITLE###</h2>
}
11 = TEXT
11 {
value = <p>Beschreibung: ###TX_DAM.DESCRIPTION###</p>
}
12 = TEXT
12 {
value = ###TX_DAM.DATE_MOD###
strftime = %d. %b %Y
noTrimWrap = |<p>Änderungsdatum: |</p>|
}
13 = TEXT
13 {
value = ###TX_DAM.FILE_SIZE###
bytes = 1
bytes {
labels = {$styles.content.uploads.filesizeBytesLabels}
}
noTrimWrap = |<p>Grösse: |</p>|
}
14 = TEXT
14 {
value = <p>Kategorie: ###TX_DAM_CAT.TITLE###</p>
}
20 < plugin.tx_browser_pi1.displayList.master_templates.modules.dow nload.thumbnails.withDownloadLink
30 = TEXT
30 {
value = <p>###TX_DAM.CAPTION###</p>
}
40 < plugin.tx_browser_pi1.displayList.master_templates.modules.dow nload.textlinks.withDownloadLink
90 = TEXT
90 {
value = <div style="clear:both;font-size:0;line- height:0;"> </div>
}
}
}
}
}
}
}
Page¶
We need a small CSS template for a proper record layout. You can take the CSS file of the Browser extension. And you can take your own one – please adapt the path to your needs.
...
page {
includeCSS {
37165 = EXT:browser/res/sample/dam/default.css
}
}
TypoScript – 3/3¶
You are using some master templates. The master templates contains values, which depends on your configuration. All this values are constants. You maintain it with the TYPO3 Constant Editor.
Constant Editor¶
Modul: Web > Template
Page tree: page "Browser DAM Sample"
Edit area: [Constant Editor]
[BROWSER – DOWNLOAD MODULE]
page uid: the uid of the page "Browser DAM Sample"
field files: tx_dam.file_name
Marker field uid TX_DAM.UID
Marker field files TX_DAM.FILE_NAME
Marker field path TX_DAM.PATH
Marker field titles TX_DAM.TITLE
TypoScript snippet¶
The editor stores your configration in the constants field of your TypoScript on the page "Browser DAM Sample":
plugin.tx_browser_pi1.downloadmodule.pageUid = 7530 <- your uid!
plugin.tx_browser_pi1.downloadmodule.tableField = tx_dam.file_name
plugin.tx_browser_pi1.downloadmodule.uid = TX_DAM.UID
plugin.tx_browser_pi1.downloadmodule.files = TX_DAM.FILE_NAME
plugin.tx_browser_pi1.downloadmodule.path = TX_DAM.FILE_PATH
plugin.tx_browser_pi1.downloadmodule.titles = TX_DAM.TITLE
Result in the frontend¶
List view¶
The result depends on your file data.
A click on the thumbnail will forward to the single view.
Single view¶
A click on the thumbnail will load the download dialog.
The result depends on your file data.
Next steps¶
Now it is your job, to detail the views and adapt it to your needs.
Filter¶
The TypoScript template for this sample contains two filters.
If you like to use filters, please
- add the marker for each filter to the HTML template and
- configure the filter in the TypoScript.
See
- HTML: typo3conf/ext/browser/res/sample/dam/default.html
- TypoScript: typo3conf/ext/browser/static/samples/dam/setup.txt
Reference¶
You find all other stuff in the manual of the Browser. See "Further Information" on page 6 above.
Forum¶
Illustration 17: The TYPO3-Frontend-Engine Browser Forum
The Browser has its own forum. We speak English and German. You are welcome to post any question, bug or snippet code at
TYPO3-Frontend-Engine Browser: Forum http://typo3-browser-forum.de/
To-Do List¶
Nothing to do.