Prettyfier
Prettyfier 2.1 is included in your installation of the agile downloads module. With the help of Prettyfier you can easily customize the look & feel of your document lists. By defining rules you can prettify websafe file names. So you can change the websafe filename "my_ugly_filename.doc" to the display name "my filename is pretty.doc". Note: Prettyfier only adjusts the display name within the module instance. The download link / effective filename is not changed. So when the file is downloaded, a file with the name "my_ugly_filename.doc" will be found in the Downloads folder.
The Prettyfier is designed to make it easy for you to remove unnecessary information from the ad name.
A lite version of the Prettyfier is also available in the lite version of the agile downloads module. This is limited in options, but is sufficient for simple rules.
create a rule with the Prettyfier
To create a rule, go to the "Label Custom Rules" tab in the module settings - Here you can create a new rule using the Plus button.
Rule Types
Currently, the following rule types are available:
- Append before
- Attach after
- Replace
- Remove all integers
- Remove leading numbers
- Remove trailing numbers
With the Replace option you can search for a component in the file name and replace it with something else (or nothing). So if we apply the Replace rule with the search string "_" and the Replace string " " to the file my_filename_copy.txt it becomes: "my filename copy.txt". To remove the string " copy" we create a second rule of the type Replace and define as search word "copy" and leave the field for the replacement empty. This leads to the label: my Filename.txt. We don't have to care about the file extension in the agile downloads module. There is a separate option for this in the Layouts tab.