What is the best way to pass pre-create attributes to publish context?

TL;DR

  • You can add attr defs in creator plugins. where you use get_pre_create_attr_defs and get_instance_attr_defs. attrs will be available for each instance of your creator plugin.
  • You can add attr defs in publish plugins. where you use get_attribute_defs. there are two types, instance and context.
  • instance plugin: attrs will be available for all instances of the specified families.
  • context plugin: attrs will be available for the whole context.

Examples

This is achieved by implementing a publish context plugin.