init_folders

4.1.0

 

Tag {init_folders} displayes sub-folders from one folder.

Parameters

  • parent - parent folder ID where to get the sub-folders. If parent is not defined then "public/" folder ID is used.
  • parent_dir - parent folder name where to get the folders. If parent_dir is not defined then "public" is used.
  • name - variable name where the returned data is saved. Default value is "folders".

Attributes

  • id - ID number of the folder
  • parent_id - ID number of parent object.
  • title - folder name
  • parent - parent folder ID
  • fullpath - absolute path to the folder
  • file_count - the number of files in the folder

Example

{init_folders parent_dir="public" name="folders"}
{foreach from=$folders item="fldr"}
   {$fldr->title}<br />
{/foreach}