Files

Files are content typically created by external programs and imported for use in Cascade CMS.

Overview

Files in Cascade CMS are used 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. Unlike pages, files are static and their contents doesn't change based on other assets in the system.

JPEG and PNG images are directly editable from within the system using the built-in image editor. Plaintext files such as CSS, JavaScript, and PHP are are also directly editable using the advanced code editor. Only the metadata of other binary file types such as PDFs is editable. The contents of binary file types can be updated using the file upload field.

Note - You can limit the type and/or size of files that can be created in Cascade CMS with the File Limit Plugin for Asset Factories.

Uploading Files

To upload one or more files:

  1. Click Add Content > Default > File.
  2. 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.
  3. In the Placement Folder field, choose the folder where the file(s) should be uploaded.
  4. 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.
  5. In the Metadata tab (available for single file uploads only), add any necessary metadata for your file (title, author, etc.).
  6. 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.
    • Maintain absolute links when rewriting - Enable this if you need to keep absolute links in your file(s) when rewriting.
    • Rewrite links in file - If there are links in the file(s), enabling this will rewrite them to be working links.
  7. Click Preview Draft and Submit.
Note - To upload multiple files simultaneously, users must have the Bypass workflow ability enabled in their Site Role.

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:

  1. Click Add Content > Default > File.
  2. 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).
  3. If uploading the zip archive as is, enter a name for your file in the Name field.
  4. In the Placement Folder field, choose the folder where the file(s) should be uploaded.
  5. If unpacking the zip archive, choose the Metadata Set that the files should use in the Metadata Set field.
  6. 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 editable text and image file extensions lists represent what can be edited within Cascade's built-in editor. Files not part of this list (PDF files, Microsoft Office files) may still be uploaded but won't be editable internally.

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.