Here’s a couple of quick videos that show the basic principles of the formatting rules functionality:
This video shows the Rule and Rule Sets concepts: Rules are effectively the same as pagination library items in previous versions of EC. Instead of being stored in libraries, they are stored in the document as a snippet. You can set the Pagination Rules on them in the same way as before with the Pagination Module, but it’s all done through a dialog now instead of the panel.Briefly, the video shows:- Dragging each Product Style into the Formatting Rules panel to create a new Rule
- The first three items are assigned their relevant grouping levels in the panel (the same as the Paginate > Once Per Group and Group Name pagination rules of old)
- The last item paginates at the record level.
- Creating a new Rule Set – ‘My Rule Set’. A Rule Set is a collection of Rules, and for the first example I don’t include the Rule for paginating records.
- Dragging the Rule Set to a text box on the page (this tells EC which Rule Set to use when populating the box)
- Dragging the data we want to paginate to the box
Up to now, we’ve not done a great deal more than flow-based pagination would have achieved. However, what happens if you decide to add a new library item that paginates the records? What if you change a library item so that it includes new fields, or you format certain fields differently? When using pagination you would have needed to repaginate everything. However, because the Product Styles (Rules) are stored in the document we can store a link back to them. We also store information in the text box that defines what the source data looked like when it was paginated, and each item knows which particular bits of that information were used to paginate them. With all of this we’re in a position to update individual parts of the document — replacing Product Styles if they change, inserting records if they appear in the data, etc.
- Next the video shows creating a new Rule Set. This one does contain the record Rule.
- Dragging the new Rule Set to the text box
- You’ll now see that because it knows the data that was used, it’s able to insert the new items into the correct position.
This video shows what happens when the source data changes. You’ll see that I change the group that one of the paginated records belongs to, and ‘Update Document’. You should see that the record was moved to the relevant group in the document. This has not re-paginated everything, only the elements in the document that were affected.