Tag: exp:ajw_client_downloads:folder
» Visit the Client Downloads support page
Tag reference for Client Downloads
The Display tags is used to display a list of folders and assets assigned to a member.
Parameters
By default, the display tag will show all folders assigned to the currently logged-in member.
folder_id=
folder_id="1"
You can optionally select an individual folder to view
orderby=
orderby="title"
You can change the order that the folders appear with the orderby= and sort= parameters.
Possible values for this parameters include: id (the default), title, and created.
sort=
sort="desc"
The default is “asc”.
limit=
limit="10"
override_member=
override_member="yes"
Used in conjuction with folder_id= to allow any user to view a specified folder, whether it has been assigned to the member or not. This can be used to give all users, or all users in a particulate member group, access to a shared folder without having to set up each user.
Variables
folder_id
{folder_id}
folder_title
{folder_title}
folder_description
{folder_description}
Variable Pairs
Within the display tag you use the assets variable pair to list all the assest within each folder.
{exp:ajw_client_downloads:folder}
<h1>{folder_title}</h1>
<p>{assets}</p><p>{title}</p>
<p>{/assets}<br />
{/exp:ajw_client_downloads:folder}</code></p>
</pre>
<p>This will display the folder title, followed by a list of all assets in that folder.</p>
<h4 id="assetsparameters">[assets} parameters</h4>
<h4 id="orderby">orderby=</h4>
<pre><code>orderby="title"
You can change the order that the assets are displayed with the orderby= and sort= parameters.
Possible values for this parameters include: id (the default), title, and created.
sort=
sort="desc"
This defaults to “asc”.
{assets} variables
Within the {assets} pair you can use the following variables:
{id}
{id}
The asset’s id.
{title}
{title}
The asset’s title.
{description}
{description}
The asset’s description.
{keywords}
{keywords}
The asset’s keywords.
{url}
{url}
The link to download the asset.
{prettydate}
{prettydate}
Displays the date the asset was uploaded in a friendly format (eg, Yesterday).
{date}
{date}
Displays the date the asset was uploaded. You can use the standard ExpressionEngine date formatting options.
{assigned}
{assigned}
Displays the date the asset was assigned to the user.
{size}
{size}
Displays the asset’s filesize.
{extension}
{extension}
Displays the asset’s file extension.
Conditionals
no_results
{if no_results}<p>There are no folders for this user</p>{/if}
This will display a messages if the current user has no folders assigned to it.
no_assets
{if no_assets}<p>There are no assets in this folder</p>{/if}
Used within the {assets} loop, this will display a message if a folder has no assets assigned to it.
Examples
A full, self contained example:
{exp:ajw_client_downloads:folder orderby="id"}
{if no_results}There are no folders for this user
{/if}
{folder_title}
{folder_description}
Id
Title
Size
Date
Extension
{if no_assets}There are no assets in this folder {/if}
{assets orderby="title"}
{id}
{title}
{size}
{date}
{extension}
{/assets}
{/exp:ajw_client_downloads:folder}
List all a user’s folders:
{exp:ajw_client_downloads:folder orderby="title"}
{if no_results}There are no folders for this user
{/if}
{/exp:ajw_client_downloads:folder}
List the contents of a specific folder:
{exp:ajw_client_downloads:folder folder_id="{segment_3}"}
{if no_results}There are no folders for this user
{/if}
{assets}
{/assets}
{/exp:ajw_client_downloads:folder}