SmartenContent is the runtime placeholder engine that resolves dynamic values inside content structures using a record context.
It traverses nested content and replaces {{...}} expressions in strings.
This allows dynamic text in CMS blocks, filters, and query-like structures.
{{property=firstname&object=user&relation=owner&defaultValue=John}}
Common parameters include:
property: The name of the property or field you want to resolve from the record context (e.g.,firstname).object: The object type from which to fetch the property value (e.g.,user,candidate). Controls the lookup context of a related record.relation: The name of the relation to traverse in order to fetch a related record before resolving the property (e.g.,owner,applied_for).defaultValue: The value to use if resolution fails or the target property is missing/no record found.relationType(primaryorall): Determines whether to resolve only the primary related record (primary) or aggregate values from all related records (all).seperator: String used to join multiple values whenrelationType=allaggregates several results (note: spelling should usually beseparator).internal: If true, fetches the internal/raw value (e.g., underlying ID) instead of the display/transformed value.cypher: Enables custom Cypher query injection for advanced graph traversals before value resolution. Used for power user graph queries.user: Context flag for injecting the current user (e.g., foruser=uuid), allowing placeholders to resolve based on the active session.failLevel: Determines the error-handling strategy on resolution failure, such as whether to prune just a field, the entire block, or a larger content subtree.
When relation/object context is provided:
- related records are loaded using the relation
- values can be aggregated (
relationType=all) with separator joining - fallback default values are used when no related value resolves
This enables expressive dynamic text beyond simple property interpolation.
failLevel supports higher-level pruning decisions in caller logic (for example CMS tree pruning in PageContent workflows). It helps you decide whether to:
- remove only a field
- remove a block
- remove a parent subtree
based on where smartening failed.
- Prefer explicit
property,object, andrelationparameters in new templates. - Use
defaultValuefor safer public rendering. - Use
internal=trueonly when raw/internal values are actually required. - Keep placeholders small and deterministic for easier debugging.