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: Hierarchical File List according to DAM Categories

Author:Christopher
Created:2010-12-18T19:57:23
Changed by:Frank Thorsten Breuer
Changed:2014-04-15T21:08:06
Classification:dam_tree_view
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) ----
Keywords:dam categories tree view hierarchical file list FIONA
Author:Frank Thorsten Breuer
Email:frank-thorsten.breuer@udo.edu
Language:en

img-1 img-2 EXT: Hierarchical File List according to DAM Categories

Extension Key: dam_tree_view

Language: en

Version: 0.1.1

Keywords: dam categories tree view hierarchical file list FIONA

Copyright 2014, Frank Thorsten Breuer, <frank-thorsten.breuer@udo.edu>

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

`EXT: Hierarchical File List according to DAM Categories 1 <#__RefHeading__5708_1738894311>`_

`Introduction 3 <#__RefHeading__5710_1738894311>`_

What does it do? 3

Screenshots 4

`Users' manual 5 <#__RefHeading__467_413120346>`_

Categories 5

Files 5

Displaying and Sorting Categories and Files 5

Frontend content 6

`Administration 8 <#__RefHeading__31511_818911409>`_

`Configuration 9 <#__RefHeading__1976_921074298>`_

Reference 9

Example 9

`Known problems 10 <#__RefHeading__31525_818911409>`_

`To-Do list 11 <#__RefHeading__477_413120346>`_

`ChangeLog 12 <#__RefHeading__31623_818911409>`_

Introduction

What does it do?

The frontend plugin shows a hierarchical list of files sorted by DAM categories similar to FIONA media pools. The plugin shows a tree of selected DAM categories. Within each category links to those files that belong to the respective category are shown.

Configuration of plugin in backend (see screenshots) allows:

  • Selection of DAM categories to be shown
  • Selection of directories which files to be listed
  • Sorting of categories and files by various criteria

No TypoScript configuration is needed unless layout of lists is changed.

The access rights for files and categories set by DAM are respected.

By the way FIONA is a commercial content management system that can handle lists of e.g. pdf files as media pools very easily - easier than media in typo3. Although FIONA - in the author's opinion - has limited features compared to Typo3, FIONA's media pools are extraordinary powerful.

Screenshots

Create new plugin:

img-3 img-4 See result in frontend:

img-5 Please see users' manual for mor detailed screenshots.

Users' manual

Insert the frontend plugin to a page content.

img-3 Categories ^^^^^^^^^^

Select the DAM category which files and subcategories you want to list. Please note that you must select exactly one category. If you want to show two or more trees you must insert multiple instances of the plugin. If you check the option “Ignore subcategories” only the chosen category's files but no subcategories will be listed.

img-6 Empty categories will not appear unless you uncheck the option “Hide empty categories”. Empty categories will show a message “Presently no information available”.

img-7

Files

Select the directories containing the files you want to display. Files in subdirectories are listed, too, unless the option “ignore files in subdirectories” is checked.

img-8 Displaying and Sorting Categories and Files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can choose to display either titles, subtitles or navigation titles of the selected categories and either titles, file names or download file names of the listed files.

img-9 img-10 You can sort both categories and files by various criteria. Categories can be sorted as in the backend module, by titles, subtitles or navigation titles. Files can be sorted by title, file name or file download name.

img-11 img-12 If the categories are sorted as in the backend module you can choose to either list the files or the subdirectories first. Otherwise subcategories and files can be merged by a lexicographical sort on the selected sorting criteria.

img-13 Frontend content ^^^^^^^^^^^^^^^^

The content shown in the frontend may look like the following screenshots. Please note that the categories' navigation titles e.g. read 02_cat if the title starts with second and e.g. the third demo file's name reads 03_demo_file.txt. Obviously files assigned to more than one category are listed several times.

Categories sorted by title, files sorted by title, categories and files merged by lexicographical sort on titles – titles shown – empty categories hidden.

img-14 Categories sorted as in backend module, files sorted by file download name, files first, subcategories thereafter – titles shown – empty categories shown (german frontend)

img-15 Categories sorted by navigation title, files sorted by file name, categories and files merged by lexicographical sort on navigation titles resp. file names – navigation titles resp. file names shown – empty categories shown. Probably you will not use this option, nevertheless it will help you to understand the above examples.

img-16 Installation and Configuration ------------------------------

One of this extension's purposes is to reduce configuration overhead when listing files managed with dam categories.

This extension works out of the box. Just include one of the static template files. You can choose from grey bullets, lime bullets or no bullets.

An alternative template file can be referenced by TypoScript. See static template files for how to redefine style sheets. All other options are set in the backend of the plugin.

Reference

TypoScript-Setup

templateFile

Property

templateFile

Data type

string

Description

If defined the stated file will be used as template file instead of the default file

Syntax:

path/filename

Example:

plugin.tx_damtreeview_pi1.templateFile
    = path/filename

Default

Example

img-17 Administration --------------

This extension requires the extensions “dam” and “dam_catedit” to be installed. It is strongly recommended to install the extension “naw_securedl”.

Template File

The template file is designed as following.

<!-- ###DAM_TREE_LIST### begin-->
  <div class="tx_damtreeview_pi1">
  <ul>
  <!-- ###DAM_TREE_ITEM### begin-->
  <li>###ITEM###</li>
  <!-- ###DAM_TREE_ITEM### end-->
  <!-- ###DAM_TREE_SUBCATEGORY### begin-->
  <li class="tx_damtreeview_pi1_subcategory">
    <span class="tx_damtreeview_pi1_subcategory">###CATEGORY###</span>
    ###SUB_TREE###
  </li>
  <!-- ###DAM_TREE_SUBCATEGORY### end-->
  <!-- ###DAM_TREE_NO_ITEM### begin-->
  <li>###TEXT###</li>
  <!-- ###DAM_TREE_NO_ITEM### end-->
  </ul>
  </div>
<!-- ###DAM_TREE_LIST### end-->

The ###DAM_TREE_LIST### subsection defines the list as a whole. Within this list there can be links to files defined by the ###DAM_TREE_ITEM### subsection and subcategories defined by the ###DAM_TREE_SUBCATEGORY### subsection or a message defined by the ###DAM_TREE_NO_ITEM### subsection.

Within the ###DAM_TREE_ITEM### subsection the ###ITEM### tag is replaced by the file title and links to the file content.

The ###DAM_TREE_SUBCATEGORY### subsection defines how a subcategory is rendered. The ###CATEGORY### tag is replaced by the category title. The ###SUB_TREE### tag is recursively replaced by the ###DAM_TREE_LIST### template.

The ###DAM_TREE_NO_ITEM### subsection is used to show a message that no files are found for the respective category, if the hide empty categories box is unchecked in the backend. The ###TEXT### tag is replaced by the phrase defined in pi1/locallang.xml.

It is encouraged to copy the template file and set plugin.tx_damtreeview_pi1.templateFile if the template is to be modified, see configuration.

Cascading Style Sheets

The styles are set by _CSS_DEFAULT_STYLE. The following example is from the static file “grey bullets”.

plugin.tx_damtreeview_pi1._CSS_DEFAULT_STYLE (
   div.tx_damtreeview_pi1 ul { list-style-image:
                        url(../typo3conf/ext/dam_tree_view/icons/square_grey.png); }
   li.tx_damtreeview_pi1_subcategory { list-style: none; list-style-image: none; }
   span.tx_damtreeview_pi1_subcategory { margin-left: -1em; font-weight: bold; }
)

Known problems

There are no known problems. If you notice one please let the author know.

Only one thing might be regarded as problem and not as a feature: The files' “download file names”, configured in dam, are ignored when files are downloaded. So you can misuse the “download file name” field for sorting or you can feel annoy ed by that.

To-Do list

Adapt to Typo3 versions 6.0, 6.1 and 6.2. DAM has been replaced by FAL in versions 6.x.

Add icons to links that show the file types.

ChangeLog

0.1.1

Version

0.1.1

Changes

Added this manual, corrected typos in language files, added static template files, defining extension's style sheets and updated hash in ext_emconf.php.

0.1.0

Version

0.1.0

Changes

Initial version.