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.

EXT: SICI Dam Download List

Created:2006-02-17T12:34:43
Changed by:Davide Principi
Changed:2006-04-11T12:26:40
Classification:docweb Typo3 extension development
Keywords:sici, dam, docweb
Email:d.principi@provincia.ps.it
Info 2:
Info 3:
Info 4:

EXT: SICI Dam Download List

Extension Key: sici_damdl

Copyright 2006, d.principi@provincia.ps.it, <d.principi@provincia.ps.it>

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.com

Table of Contents

EXT: SICI Dam Download List `1 <#0.EXT:%20SICI%20Dam%20Download%20List|outline>`_

Introduction `1 <#0.0.Introduction|outline>`_

Screenshots 2

Users manual `2 <#0.0.Users%20manual|outline>`_

Adminstration `2 <#0.0.Adminstration|outline>`_

Migrate from EXT:dam_downloadlist 3

Configuration `3 <#0.0.Configuration|outline>`_

TypoScript Reference 3

Tutorial `4 <#0.0.Tutorial|outline>`_

Known problems `4 <#0.0.Known%20problems|outline>`_

To-Do list `4 <#0.0.To-Do%20list|outline>`_

Changelog `4 <#0.0.Changelog|outline>`_

Introduction

sici_damdl shows a list of download links. The list can be structured: files can be grouped by file name. It allows TypoScript user-defined layouts and grouping criteria, or selecting one of the predefined css-based layouts.

If you don't need grouping criteria see also EXT:dam_filelinks.

Screenshots

img-1 Illustrazione 1: FE layouts example

As shown on figure Illustrazione 1 , sici_damdl is presented on 3 layouts: two columns, listed and - on the right column - with thumbnails. Users manual ------------

This is a procedure that make it visible on FE.

img-2 insert a new content element of type DAM Download List

save immediately the new content element: this is required by the DAM filelist control.

select files using “DAM Download List” form field. (If you didn't save at first your selection will be lost!)

img-3 [Optionally] Select a layout from those available (If you didn't save before, only default layout is available)

img-4 NOTE: “Override title” and “Override Description” fields can be renamed in the future! Their behaviour depends on the selected layout.

They should be used to replace Title or Description of the n th selected file with arbitrary text data inserted on the n th line of those fields.

Adminstration

To bring sici_damdl up and working on FE, you should include the static template. There are 4 static templates available:

  • SICI Dam Download List (required)
  • DAMdl thumbnails
  • DAMdl two columns
  • DAMdl compact (not imlemented yet)

Each static template provides one or more layouts as shown on this table:

SICI Dam Download List

Static template name

SICI Dam Download List

Layout

Legacy (dam_downloadlist compatible)

DAMdl thumbnails

Static template name

DAMdl thumbnails

Layout

thumbnails, smallthumbs

DAMdl two columns

Static template name

DAMdl two columns

Layout

twocolumns

DAMdl compact

Static template name

DAMdl compact

Layout

Not implemented yet

If you know about TS, you can add your own layouts: see section “Configuration”.

Moreover, you should provide some css to adjust the final result to your site! Default styles are included in the extension, under res/ directory.

Migrate from EXT:dam_downloadlist

Administrator users can access a BE module available to convert EXT:dam_downloadlist content object to sici_damdl: DAM download list converter |img-5| (DDL Cnv) .

To enable this module

go to the Ext Manager;

select sici_damdl extension;

check dam_downloadlist migration tool option;

press “update” button;

reload the be page (or do a logout/login).

If you don't have dam_downloadlist installed, you don't need this module.

Configuration

This extension is based on sici_core . sici_core is not released as a separate extension at the moment, it is included under scbase/ subdir. The following TypoScript reference is strictly related to that extension.

The discussion on the ideas around sici_core is published on Typo3Wiki at the following url: http://wiki.typo3.org/index.php/Grouped_List_Layout

Consider it as part of this document.

TypoScript Reference

default

Property

default

Data type

string

Description

set to one of the keys in layout property

Default

default

layout.[array]

Property

layout.[array]

Data type

[layout]

Description

this is the container of layout specifications

Default

[tsref:plugin.tx_sicidamdl_pi1]

->layout
title

Property

title

Data type

string

Description

layout title (shown on BE form only; passed to $LANG->sL)

Default

the layout key

dataSource

Property

dataSource

Data type

[dataSource]

Description

Default

render.[array]

Property

render.[array]

Data type

[render]

Description

Default

group.0, ..., group. n

Property

group.0, ..., group. n

Data type

[group]

Description

Default

[tsref:plugin.tx_sicidamdl_pi1.layout]

->render
nodeType

Property

nodeType

Data type

string or “*”

Description

possible values: “item”, “group”, “single”, “leaf”, “sibling”

Default

nodeTag

Property

nodeTag

Data type

string or “*”

Description

this is set by grouping function

Default

nodeLevel

Property

nodeLevel

Data type

integer or “*”

Description

tree depth

Default

nodeState

Property

nodeState

Data type

string or “*”

Description

set by querystring

Default

nodeIndex

Property

nodeIndex

Data type

integer or “*”

Description

special values: “odd”, “even”

Default

nodePosition

Property

nodePosition

Data type

string or “*”

Description

possible values: “first”, “last”, “middle”

Default

pager

Property

pager

Data type

[pager]

Description

...if you have hundred of files...

Default

pageBrowser

Property

pageBrowser

Data type

pagebrowser

Description

Default

compose

Property

compose

Data type

string

Description

a comma-separated list of other render layout keys that are applied in sequence before the current one.

Default

stdWrap

Property

stdWrap

Data type

stdWrap

Description

insert markup details here using stdWrap properties

Default

[tsref:plugin.tx_sicidamdl_pi1. [layoutName] .render]

-> group
sort

Property

sort

Data type

function-name

Description

example: EXT:sici_damdl/pi1/class.tx_sicidamdl_pi1.php:&tx_sicidam dl_pi1->gfunc_altfmt

A simple string is evaluated as a member function name of the current plugin instance.

Default

func

Property

func

Data type

function-name

Description

see above

Default

[tsref:plugin.tx_sicidamdl_pi1. [layoutName] .group]

-> pager
stdWrap

Property

stdWrap

Data type

stdWrap

Description

wraps the page contents

Default

itemsPerPage

Property

itemsPerPage

Data type

integer

Description

page size; set to 1 to get an odd/even effect

Default

[tsref:plugin.tx_sicidamdl_pi1. [layoutName] .pager]

See also http://wiki.typo3.org/index.php/Grouped_List_Layout

Example

Below there is twocolumns layout configuration, extracted from sici\_damdl/static/exly2/setup.txt

During the grouping phase the first level acts on records as returned from the data source (level 0), grouping by gfunc\_altfmt user function (line 7). This generates the 2 nd level items. That function is a member of the plugin php object.

The rendering phase wraps each node of the generated tree, selecting one of the :code:`render` elements. Selection occurs evaluating some properties (nodeType, nodeTag, nodeLevel, nodeState, nodeIndex, nodePosition). The most important is nodeType that specifies if a node has descendant or not (group/item line 11, 21, 33). Node tag “root” is set to the root of the tree. “single” are the nodes that form a group with a single element.

Those items are splitted on 2 balanced pages ( balancedPages line 16). Each page is wrapped as specified on line 15 by page.stdWrap.dataWrap .

 0: # $Id: setup.txt 861 2006-03-23 09:13:09Z davide $
 1:
 2: plugin.tx_sicidamdl_pi1.layout.twocolumns {
 3:     title = LLL:EXT:sici_damdl/pi1/locallang.php:twocolumns
 4:
 5:     dataSource.userSelect.userFunc = fetch_db_rows
 6:
 7:     group.1.func = gfunc_altfmt
 8:
 9:     render {
10:   root-group {
11:       nodeType = group
12:       nodeTag = root
13:       stdWrap.wrap = <div class="damdl twocolumns">|<hr class="clearer" /></div>
14:       pager {
15:           stdWrap.dataWrap = <div class="damdl column column-{register:tx_sicidamdl_pi1@page_number}"><ul>|</ul></div>
16:           balancedPages = 2
17:       }
18:   }
19:
20:   group {
21:       nodeType = group
22:       stdWrap.dataWrap = <li><span class="damdl title">{field : sici_damdl_override1 // field : title}</span>&#x20;(<span title="scarica">|</span>)</li>
23:   }
24:
25:   single {
26:       nodeType = single
27:       nodeLevel = *
28:       compose = item,group
29:   }
30:
31:
32:   item {
33:       nodeType = item
34:       stdWrap {
35:           field = file_name
36:           filelink {
37:               path.field = file_path
38:               icon = 0
39:               labelStdWrap.cObject = IMAGE
40:               labelStdWrap.cObject {
41:                   file.import.field = sici_damdl_icon
42:                   altText.field = file_type
43:               }
44:
45:               file.postCObject = TEXT
46:               file.postCObject {
47:                   wrap = | &#x20;
48:                   field = file_size
49:                   bytes = 1
50:                   bytes.labels = "B|KB|MB|GB"
51:               }
52:           }
53:       }
54:   }
55:
56:     }
57: }

Tutorial

[this section is empty]

Known problems

[this section is empty]

To-Do list

[this section is empty]

Changelog

[this section is empty]

img-6 EXT: SICI Dam Download List - 5