Move Content Automatically Using Content Rules – Content Editing for Plone

Move Content Automatically Using Content Rules#

Here we show how to use a content rule to move content items automatically to a particular folder on your site.

This helps keep the site content well organized.

In this example, we create a page called "Resources" that will act as a folder.

Then we create a content rule that automatically moves PDF files to the "Resources" folder.

Create the Resources "Folder"#

  1. Click the add item button.

  2. Click Page

  3. Click Type the title...

  4. Type Resources

  5. If you'd like to hide "Resources" in the header navigation, click Exclude from navigation.

  6. Click the Save button.

Create the Content Rule#

  1. Click the personal menu button.

  2. Click Site Setup

  3. Click the Content Rules control panel icon.

  4. We first have to create a content rule. Later on, we will assign it.

    Click Object added to this container.

  5. Click Add content rule

  6. Click the Title field.

  7. Type "Add PDFs to the "Resources" content object"

  8. Click the Description field.

  9. Type "To keep PDFs organized, we will put them in one central place"

  10. Click Select...

  11. Click Object added to this container

  12. Click Enabled

  13. Click Stop Executing rules.

    In many cases you want Content Rules to be stopping as soon as possible, especially when moving content items. You may have multiple content rules if they are unrelated in their effect, i.e. sending out an email when a PDF is added.

  14. Click Save

Configure the Content Rule#

  1. Click Configure

  2. Click the {guilabel}`Condition" drop down list.

  3. Click File Extension

  4. Click Add

  5. Type pdf

  6. Click the right arrow button.

  7. Click the Action drop down list.

  8. Click Move to folder

  9. Click Add

  10. Click the Navigate button.

  11. Click Resources.

    This is the content item we created earlier.

  12. Click the right arrow button to apply the changes.

Assign the Content Rule#

  1. Click the site logo to return to the home page.

  2. We want to apply the new content rule here, the root of the site.

    Click the More button.

  3. Click Rules

  4. Click the Select rule drop down list.

  5. Click "Add PDFs to the "Resources" content object"

  6. Click Add

  7. Click the checkbox next to the rule.

  8. Click Enable.

    The content rule is now enabled for the entire site.