In the Tag Smart Content app
Smart content provides a powerful way to merge content, logic and data. Logic is the glue, and making logic easy to create is a major strength of Tag.
Logic is defined using expressions. Some expressions resolve to true/false, and can make inserting a fragment conditional (e.g., only insert if expression is true). Other expressions modify data values, calculate math equations, invoke powerful functions, and more.
Expressions are powerful, but we want to keep things simple. Tag does this by providing three unique point-and-click editors (and one raw syntax panel). This no-code approach gives you the power of a programmer without having to learn how to write code.
Quick Values panel
When you are editing content, you can access all data imported into your templates.
The Quick values panel gives you access to this data. Its Source data tree lets you quickly find the data field you want.
If the data type can be formatted (e.g., date), common format options are included as child branches.
Conditional content (if or choose) is only inserted when you want it. It uses expressions that return true or false.
The basic panel uses popup menus to create one or more conditions. A condition has left and right parts, and a comparison in between.
Left and right parts can be data, or literal (manually typed) values. Multiple conditions are joined with 'and' or 'or'.
Advanced is similar to Basic but more open-ended. It uses the same popup menus with more options to be clever.
You can nest expressions, use brackets and call functions. There is no need to have only three parts like a Basic expression.
It supports most of XPath 3.1, but not 100%. For the rest you can use the Raw syntax panel.