Target field dropdown gets empty by selecting template


I am experiencing a problem by making a default rule in Contentblocks. I want

  1. I did making a field and called it ‘actieblok’ In that field are 4 field types: 2 text, 1 link and a select. These field types are empty and has to be filled as the field is placed on a resource.
  2. Now i want to add actieblok field automatically by making a resource if modx template-id= 5.
  3. So i create a default rule. Set constraint field: template, constraint value: 5, default template: actieblok, Target layout: Full width, Target column: main. In Target field i can not select anything here.

Probably i am doing something wrong or did mis something. Hopefully you can helpo a bit.

The target field is for where existing content should be shown. The dropdown will show all textarea, richtext, or code fields that are in the target layout/column.

It sounds like you have a repeater (or layout?) field which contains text fields. Those text fields are not available to the default rules cause they’re not in the root of the template content.

If you don’t care about preserving existing content (e.g. it’s a new site), then you could temporarily add a textarea/richtext/code field to your template, and select that in the default rule. After setting the default rule, you can remove that temporary field again.

Thnx Mark. It’s a lot clearer how the default rules work. Mayby i can use the action block differently in Contentblocks or use your’re temporary field solution. Thnx for helping!