You can select files and add their names to some property.
This is useful if you publish pictures for your products. You might have pictures both on your website server and locally on your computer. With Cavan you can select pictures on the computer and they will be automatically appended to your website path.
To set up Cavan to enter pictures do this:
- Go to Options and select the property for which you want to specify files.
- Change property type to FileSelect.
- Add website URL to the property default value.
- For example
http://server.com/{1};http://server.com/{2} - You can select more than 1 file. You specify each file you want to be added using
{1}, {2}, etc. - Each
{x} will be replaced by the appropriate file name from the files you select. - The program expects you to select as many files as you specified. So, if you specify
{1}, {2} and {3} you're expected to select 3 files. - If you select less that 3 files the last file you selected will be used in all places where you specified additional files. With above example if you selected 2 files
{2} and {3} will be the same. If you select only 1 file - {1}, {2} and {3} will all be the same. - You can use the same file name in different places. For example
http://server.com/front/{1};http://server.com/back/{1} will use the same file for both front and back. - You HAVE to specify URL using options. Cavan uses that, not the current property value in Add item form to generate URL with file names. This allows you to re-select other files if you made a mistake.
- When you open Add item form "..." button will appear next to the value for that property. That button will show you file dialog to select files.
- You can press "Cancel" if you changed your mind.