Welcome Guest, you are in: Login

Water Mission Country Programs Wiki

RSS RSS

Navigation




Search the wiki
»

PoweredBy

File List Help

RSS
Modified on 2010/05/11 16:27 by FileListFormatter Categorized as Uncategorized

File Lists

Autogenerates a list/table of files in a directory chosen by the user, either for download or simple file overview.
You can verify that the formatter is working by opening this test page (be patient, it may be slow).

Table of Contents [Hide/Show]


Administrators

No special actions required.

Markup Usage

What can you do?
  • Generate a list/table of files in a directory that match a certain pattern
  • Specify specific FileStorageFormatter to find files in
  • Enable/disable ability to download the files
  • Sort the files asc/desc accoring to:
    • Name
    • Size
    • Last modified date
    • Download count
  • Display details of the files:
    • Size
    • Last modified date
    • Download count
  • Use tables instead of lists
    • Add a table heading
    • Override column headers and make them more user friendly
    • Change table style
    • Change columns header style
    • Change row style
    • Use one of 3 predefined styles bw,bg,gb
    • Combine several of the above options



Usage:

{FileList('Pattern','Provider',OutputType,SortMethod,CreateLinks,DetailsToShow,TblHeading,Headers,TblStyle,HeadStyle,RowStyle)}

Where:
  • Required:
    • Pattern - A valid path and file wildcard, must be encapsulated in ' '
      • All patterns must start with '/' ex. /*.*, will give all files in the root dir of the provider
      • For sub directories: /MyDir/*.* will work
        • Default dir if none specified is '/'
      • For file wildcards: *.* , Screw*Wiki.*xe, *.zip etc. will work
        • Default wildcard is *.* if none is specified
        • Note that the definition of the default dir might differ from provider to provider, ex. for Local Files Provider, the default root is /public/Upload
  • Optional:
    • Provider - Fullname as seen in the wiki File management, ex. 'Local Files Provider' and 'SQL Server Files Storage Provider', must be encapsulated in ' '
      • Default value is the chosen wiki default file storage provider
      • Note that the definition of the default dir might differ from provider to provider, ex. for Local Files Provider, the default root is /public/Upload
    • OutputType - Can be one of: *,# or 'table'
      • "*"- Means unnumbered list
      • "#"- Means numbered list
      • "table" - Means use table instead of list
      • Default is *
    • SortMethod - Can be anything from 0 - 7, where:
      • 0- Filename Ascending
      • 1- Filename Descending
      • 2- Download count Ascending
      • 3- Download count Descending
      • 4- File Size Ascending
      • 5- File Size Descending
      • 6- Last Modified Date Ascending
      • 7- Last Modified Date Descending
      • Default is 7
    • CreateLink - Should filenames displayed as download links, true or false, default is false
    • DetailsToShow - Can be anything from 0 - 7, where:
      • 0- No extra details
      • 1- Show download count
      • 2- Show download count + file size
      • 3- Show download count + last modified date
      • 4- Show download count + file size + last modified date
      • 5- Show file size
      • 6- Show file size + last modified date
      • 7- Show last modified date
      • Default is 0
  • Optional (applies only for tables as output):
    • TblHeading - Heading of the table, must be encapsulated in ' ' ex. 'My Heading'
    • Headers - Columnheaders will override default naming, must be encapsulated in ' ' ex. 'Head1,Head2'
    • TblStyle - Style format, must be encapsulated in ' ' ex. 'align="center" style="color: #000000;"'
    • HeadFStyle - Style format, must be encapsulated in ' ' ex. 'align="center" style="color: #000000;"'
    • RowStyle - Style format,must be encapsulated in ' ' ex. 'align="center" style="color: #000000;"'

  • All "," must always be included in the tag, at all times, even if the content is blank.



Minimum


Markup:

{FileList('/*.*',' ',,,,,,,,,) }

Result:

  • File1
  • File2
  • File3



Markup:


{FileList('/*.*',' ',#,,,,,,,,) }


Result:


1. File1
2. File2
3. File3



Markup:


{FileList('/*.*',' ',*,true,,,,,,,) }


Result:

  • File Link1
  • File Link2
  • File Link3



  • Markup:


    {FileList('/*.*',' ',*,7,true,0,,,,,) }


    Result:

  • File Link1
  • File Link2
  • File Link3



  • Markup:


    {FileList('/*.*',' ',*,7,true,4,,,,,) }


    Result:

  • File Link1 (1-1-2010, 10 KB, 1 downloads)
  • File Link2 (1-2-2010, 20 KB, 2 downloads)
  • File Link3 (1-3-2010, 30 KB, 3 downloads)



  • Markup:


    {FileList('/*.*',' ',*,6,true,4,,,,,) }


    Result:

  • File Link3 (1-3-2010, 30 KB, 3 downloads)
  • File Link2 (1-2-2010, 20 KB, 2 downloads)
  • File Link1 (1-1-2010, 10 KB, 1 downloads)



  • Markup:


    {FileList('/*.*',' ',*,2,true,4,,,,,) }


    Result:

  • File Link3 (1-1-2010, 10 KB, 3 downloads)
  • File Link2 (1-2-2010, 20 KB, 2 downloads)
  • File Link1 (1-1-2010, 10 KB, 1 downloads)



  • Tables and Styling

    Default style
    Depends on your chosen theme.
    Markup:

    {FileList('/*.*',' ',table,7,true,1,,,,,) }

    Result:

    FilenameDownloads
    File Link13
    File Link22
    File Link31



    Predefined style: Black and White
    Markup:

    {FileList('/*.*',' ',table,7,true,1,,,'bw','bw','bw') }

    Result:

    FilenameDownloads
    File Link13
    File Link22
    File Link31



    Predefined style: Black and Grey
    Markup:

    {FileList('/*.*',' ',table,7,true,1,,,'bg','bg','bg') }

    Result:

    FilenameDownloads
    File Link13
    File Link22
    File Link31



    Predefined style: Green and Black
    Markup:

    {FileList('/*.*',' ',table,7,true,1,,,'gb','gb','gb') }

    Result:

    FilenameDownloads
    File Link13
    File Link22
    File Link31



    Custom style:
    Markup:

    '{FileList('/*.*',' ',table,7,true,1,,,'cellspacing="10" style="background-color: #88CC33; color: #000000;"','style="color: #00AAAA;"','style="color: #BBBB00;"') }

    Result:

    FilenameDownloads
    File Link13
    File Link22
    File Link31



    Custom heading + headers:
    Markup:

    '{FileList('/*.*',' ',table,7,true,1,'My heading','Head1,Head2',,,) }

    Result:

    My heading
    Head1Head2
    File Link13
    File Link22
    File Link31

    ScrewTurn Wiki version 3.0.2.509. Some of the icons created by FamFamFam.


    Disclaimer