Rules are an important part of migrating a website. Rules are segments of code that define how the content of your old site is going to be transformed into your new site during migration. You assign rules to different fields in content types (see the Using content types section of this documentation). A default body rule is created by the Workbench when you create your site, which is used to migrate body content from your original site by default. However, if you don’t set some other rules for your content it either won’t migrate properly or it won’t migrate at all.
If you want to understand exactly how rules work and how to write them, click here to read the Rules Documentaion.
To use rules, click Rules in the dashboard’s main menu. From the Rules page you can add your own rules, edit existing rules, or delete rules. Once a rule has been created it can be assigned to content type fields (see the Using content types section of this documentation), or to fields on specific pages (see the Editing a page section of this documentation).
To make sure you have assigned rules properly you should View a page that has the rules applied to check that the content displays correctly. If the content is not displayed correctly you need to refine the rules.
Tip: Many rule operations can also be made after Exporting. Click here to find out how.
Adding a rule
To add a rule:
- Click Create at the top of the Rules page.
- Give your new rule a name and an expression.
- Click Save. Your new rule will appear in the list of rules on the Rules page.
Editing a rule
To edit a rule:
- Click the paper button on the right of the rule you want to edit.The Edit Rule page displays.
- Change the rule’s name and expression.
- Click Save when you’re done.
Deleting a rule
To delete a rule, click the x button to the right of the rule you want to delete.