To give you more inside knowledge of the working of the File Genie PHP, here you can read all the available online tutorials!
File Genie PHP Tutorials
Display Thumbnails with size and name
How do you display thumbnails
With the File Genie PHP Extension you can easily display thumbnails.
In this tutorial we will show you step by step how to display the thumbnails
with the original file name and size.
How to do it
- Open page
Open your php file where you need to display the files.
- Find the Folder List Server Behavior
You will find the Folder List Server Behavior under Bindings, Folder List.
- Apply the Folder List Server Behavior
In the Folder List Name enter the name of this Folder List object.
In Folder Browse to the folder that holds the thumbnails you would like to display.
By Allowed Extensions you can choose which files you want to display. In this case Images only.
Make sure you select Show Thumbnails Only!
- Click OK
To apply the Folder List behavior click OK.
A message box appears to tell you that the file called incFileGenie.php has been copied to your site in the ScriptLibrary folder. Click OK.
- Make the layout of your page
To actually show the files on the page open the Bindings Panel.
1. Select thumbnailImage. And click on Insert.
2. Select Name to show the name of the original image.
3. Select sizeName to show the size in kb/mb.
- Apply Repeat
To actually show all the image files in the images folder you need to apply the Folder List Repeater Server Behavior.
1. To apply the Folder List Repeater select the items on your page you want to repeat.
2. Open up Folder List Repeater. You will find this behavior under Server Behaviors, DMXzone, File Genie, Folder List Repeater.
3. You can choose to display All Records or a specific number of records.
- Result
Let's see what it looks like. Save your file and press F12 to open up the browser. For this tutorial I only displayed one record.
Comments
Be the first to write a comment
You must me logged in to write a comment.