Files
Files are content typically created by external programs and imported for use in Cascade CMS.
Overview
You can use file assets in Cascade CMS to manage and publish the content and metadata of a wide variety of file types including but not limited to images, PDFs, JavaScript, and CSS files. Unlike page assets, files are static and their contents doesn't change based on other assets in the system.
Certain file types such as image files and plain text files can be edited within the CMS. See "Editable text and image extensions" for details.
Creating a file
To create one or more files:
- Click Add Content > Default > File.
- In the Name field, enter a name for your file.
- If you prefer to use the filename of the file you're uploading, leave this field blank and it will be filled automatically when a file is selected.
- If uploading multiple files, the filenames will be used by default.
- In the Placement Folder field, choose the folder where the file(s) should be uploaded.
- Select one or more files to upload by clicking the Choose link or by dragging and dropping files from your computer into the dotted drop zone.
- If uploading a text file, you'll be able to view and edit the contents of the file using the Advanced Code Editor.
- If uploading an image file, you'll be able to view and edit the image using the built-in image editor.
- In the Metadata tab (available for single file uploads only), add any necessary metadata for your file (title, author, etc.).
- In the Configure tab, configure the following fields:
- Include when indexing - Enable this if the file(s) will need to be included in an Index Block. For example, an Index Block being used to create a dynamic navigation menu could include information about the file(s).
- Include when publishing - Enable this the file(s) will need to be published to the web server.
- Override the current Site's asset link rewriting behavior for this asset - Overrides the Site's default link rewriting behavior for links between assets within the current site in this file.
- Rewrite asset links in file - If there are internal asset links in the file, enable this ensure they are rewritten when published.
- Click Preview Draft and Submit.
Updating/Replacing a file
You can update/replace an existing File asset in the system by doing the following:
- Navigate to the File you would like you update/replace.
- Click Edit.
- Select a new file to replace it with by clicking the Choose link or by dragging and dropping the file from your computer into the dotted drop zone.
- Click Preview Draft and Submit.
- Click Publish to update the file on the live web server(s).
Once these steps are completed, the new File will retain the original File's name, path, and any associated Metadata that was already present. Additionally, any assets that previously linked to the original File will now link to the updated File.
Uploading a zip archive
It's also possible to upload multiple files by compressing them into a zip archive. This method is useful if you have multiple folders worth of files you'd like to upload and want to maintain the folder structure, as the folder structure will be recreated within your site when the zip archive is unpacked.
To upload a zip archive:
- Click Add Content > Default > File.
- Select a zip archive to upload by clicking the Choose link or by dragging and dropping it from your computer into the dotted drop zone. You'll be prompted to either unpack the files (Yes) or to upload the zip archive as is (No).
- If uploading the zip archive as is, enter a name for your file in the Name field.
- In the Placement Folder field, choose the folder where the file(s) should be uploaded.
- If unpacking the zip archive, choose the Metadata Set that the files should use in the Metadata Set field.
- Click Preview Draft or Unpack to begin the upload/unzipping process. After uploading/unzipping is complete, you'll be presented with a report of all files uploaded and any that were skipped.
Previewing a file
Files can be previewed before publishing to allow users to see how the file will look as rendered in Cascade CMS.
To view a full screen preview of your file in a new tab or window, select More > Preview.
Live view
If your file has been published, you can go directly to the live file on the web by selecting More > Live.
The URL for the live view is generated by combining the Site URL specified in Site Settings and the file's path. For example: If the current Site URL is http://example.com
and the file's path is /news/images/logo.png
then the resulting URL of the live view would be http://example.com/news/images/logo.png
.
Editable text and image extensions
The content of certain file types such as images and plain text files can be edited directly within the CMS. To edit the list of editable file extensions:
- Click the system menu button ( ) > Administration > Preferences > Content.
- Under Assets, edit the list of extensions under Editable Text File Extensions and/or Editable Image File Extensions.
Editing image files
To edit an image file:
- While viewing an image file, click Edit.
- Apply changes to your image using any of the following tools:
- Undo/Redo - Undo is available after an operation has been performed. Redo is available after an undo operation was performed. There is no limit to the number of undo/redo operations within a session.
- Rotate - rotate the image clockwise or counterclockwise.
- Flip - flip the image like a mirror, vertically, or horizontally.
- Resize - To change the dimensions of the image, change the values in the width/height fields; then click the checkmark ( ) button.
- The width and height text boxes show the current width/height of the image.
- The lock icon between the width and height boxes determines if aspect ratio should be preserved with the resizing. By default, the aspect ratio is preserved. Click the icon to toggle this setting.
- Crop - To crop, click and drag to select part of the image you want to crop to - the cursor will turn into a crosshairs and cropping dimensions will be displayed. After the cropping area has been selected, click the Crop button ( ) in the editor toolbar.
- Click Preview Draft and Submit.
- Animated GIFs manipulated using the built-in image editor will not have their animations preserved.