Asset Naming Rules
Overview
Asset naming rules allow you to enforce a consistent format for system names in Cascade CMS. When creating an asset, you'll be provided with help text to remind you of the site's naming rules. If the name you enter doesn't meet the site's requirements, you'll be prompted to change it or use the suggested name.
The following rules are available to configure:
- Capitalization
- Any - Any combination of uppercase and lowercase characters are permitted. Example: Contact Us
- Lowercase only - Only lowercase characters are permitted. Example: contact us
- Uppercase only - Only uppercase characters are permitted. Example: CONTACT US
- Spaces between words
- Allowed - Spaces between words are permitted. Example: Contact Us
- Not allowed - Spaces between words are not permitted. Example: ContactUs
- Replace with hyphen - Spaces between words should be replaced with hyphens. Example: contact-us
- Replace with underscore - Spaced between words should be replaced with underscores. Example: contact_us
- Apply rules to these asset types - You can choose which types of assets these rules apply to. For example, you may only want to apply naming rules to pages and files to ensure their names are search engine friendly.
Setting Asset Naming Rules
At the System Level
- Click the system menu button ( ) > Administration > Preferences > Content.
- Under Asset Naming Rules, configure the asset naming rules and select which asset types the rules will apply to. These rules will be enforced for sites that have Inherit from system preferences selected in their Site Settings.
- Click Submit.
At the Site Level
- Navigate to Manage Site > Site Settings > Asset Naming Rules.
- Configure the asset naming rules and select which asset types the rules will apply to.
- Alternatively, select Inherit from system preferences to enforce the rules set in System Preferences.
- Click Submit.
Viewing Naming Issues
Changes to asset naming rules will be enforced for new assets only. To see a list of existing assets that don't meet the site's system name requirements, navigate to Manage Site > More > Naming Issues.
When renaming publishable assets to comply with the site's naming rules, remember to select Unpublish Content when submitting your changes to prevent orphaned files on your web server.
Asset Factory Plug-ins and Asset Naming Rules
Asset naming rules will override the system name conversion done by certain Asset Factory Plug-ins if the rules conflict. These plug-ins include:
- Data Definition Field(s) to System Name Plug-in
- Display to System Name Plug-in
- Title to System Name Plug-in
For example: the Title to System Name Plug-in will lowercase and hyphenate the value of the Title metadata field to generate an asset's system name, unless uppercase letters and spaces are allowed in your site's asset naming rules.
If you have this plug-in enabled for one or more Asset Factories, your asset naming rules should be set to allow lowercase letters and hyphens only and apply to the asset types corresponding to your Asset Factory types.
In addition, if you have either of the following Asset Factory plug-ins that use regular expressions to validate system names enabled, it's recommended that your regular expression comply with your site's asset naming rules to prevent confusion: