3

Let's say I have a template, Template A, that has a field section, Foo Data, that contains some fields. If I create another template, Template B, that inherits Template A and add a new field, "Bar", how can I include the new field in the Foo Data field section from Template A?

5

So long as you name the field section that contains the "Bar" field on Template B the same as you named the field section on Template A, Foo Data, the two field sections will merge.

Example:

Template Definitions:

Template A
  Foo Data
    Baz           - Single-Line Text
    Baz Thumbnail - Image

Template B
  Foo Data
    Bar           - Single-Line Text

will result in a display like the following on your item instances of the Template B template, in the Content Editor:

-----------------------------------
Foo Data                         v
-----------------------------------

Baz
[SLT Field]

Baz Thumbnail
[Image Field]

Bar
[SLT Field]
1
  • 1
    Great answer @ZacharyKniebel! I would go just one step further (if it were me) and also explain how this design pattern can also lend itself to a duplicate field flaw. =) – Pete Navarra Oct 28 '16 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.