This shortcode displays a list of files in the user’s filebox using a simple template language to let you completely control the look and feel of the list.
[memb_list_filebox]
This Applies to
Summary
This shortcode displays a list of the files located in an individual contact’s filebox.
Shortcode Examples
The following will display a table with Line #, Filename, Filesize, and Link:
<table> [memb_list_filebox] <tr> <td>%%line%%</td> <td>%%filebox.filename%%</td> <td>%%filebox.filesize%%</td> <td><a href="%%filebox.downloadlink%%">Download</a></td> </tr> [/memb_list_filebox] </table>
The following will display only files with PDF in their name, with Line #, Filename, Filesize, and Link:
<table> [memb_list_filebox filter="pdf"] <tr> <td>%%line%%</td> <td>%%filebox.filename%%</td> <td>%%filebox.filesize%%</td> <td><a href="%%filebox.downloadlink%%">Download</a></td> </tr> [/memb_list_filebox] </table>
Shortcode Parameters
contact_id: Not required. The id number of the contact in Infusionsoft. Defaults to the currently logged in user’s Contact Id.
filter: Text to match the included file’s names to. To include only DOC files, use “doc” as the fillter.
Template Codes:
You can use the following template codes inside the shortcode to control the display of the individual file information in your layout:
%%cycler%%: The odd/even cycler used for zebra striping listings.
%%line%%: The current line number. The line number count starts at 1.
%%filebox.filesize%%: The size of the file in human readable format. For example, a file 65536 bytes long would be listed as “64KB”
%%filebox.filebytes%%: The size of the file in bytes.
%%filebox.extension%%: The file’s extension.
%%filebox.filename%%: The full name of the file.
%%filebox.id%%: The Infusionsoft ID of the file.
%%filebox.public%%: 1 if the file is publically accessible, 0 if the file is private.
%%filebox.openlink%%: A link to open the file in the browser. This may or may not be supported by your browser and various programs. Best used inside of an HTML link such as: <a href=”%%filebox.openlink%%”>View</a>
%%filebox.downloadlink%%:A link to download the file from the browser. This may or may not be supported by your browser and various programs. Best used inside of an HTML link such as: <a href=”%%filebox.openlink%%”>Download</a>
The default output looks is:
<p> %%line%% - %%cycler%%<br /> filesize: %%filebox.filesize%%<br /> filebytes: %%filebox.filebytes%%<br /> extension: %%filebox.extension%%<br /> filename: %%filebox.filename%%<br /> id: %%filebox.id%%<br/> public: %%filebox.public%%<br/> <a href="%%filebox.openlink%%">Open</a><br/> <a href="%%filebox.downloadlink%%">Download</a><br/> </p>