Printing and Sorting New Fields in Field Collection & Widget Templates
Field Collections and Widgets can be customized to suit any theme or business need.
In some cases, new fields are no longer automatically added to these templates and additional steps must be taken to get newly added fields printing.
Fields Added or Removed Before a Template has been Created
If the Field Collection or Widget has been created but not yet added to a theme via Layout Areas, no additional steps are needed. Later, if a template is generated manually via the Code page or when placing the Field Collection or Widget in a theme, the app will generate all the "boilerplate" starter code. This code is a starting point and may be customized to suit your needs.
Fields Added or Removed After a Template Already Exists
Once a template has been created for a Field Collection or Widget, newly added fields will not be automatically added to the template. This can be rectified in two ways.
Option 1: Reset the Template
If you have not customized the template, you can simply head to the Code page for the Widget or Field Collection. Under the "More Actions" heading at the bottom of the page, select "Reset to default template".
Option 2: Manually Update
If you have customized the template, we recommend viewing the Example Code section and copying the new field code there, and pasting it into your customized template as needed.
Sorting Field Collection or Widget Fields Before a Template has been Created
Field Collection fields are sorted in the template based on the order they appear on the content entry form before the template has been generated.
The sort order of built-in Widget fields are not impacted by the content entry form. Newly added fields are placed and sorted based on their location in the content entry form. For example, within a Tabs widget, sorting the title and body on the content entry form does not change the output, but two new fields added would be printed below the body field for the tab, in the order they appear in the form.
Sorting Field Collection or Widget Fields After a Template Already Exists
Once a template has been created, changes to the content entry form's sort order have no impact on the template. At this point, changes to the sort order of fields in a Field Collection or a Widget need to be made manually via the Code section for the Field Collection or Widget.