I’m in a dilemma over how best to structure some content via my channel entry fields (and, subsequently, in the template) and I’d be interested in hearing other people’s take on the subject.
The content in question is short ‘user guide’. It consists of three or four sections, with each section being comprised of an ordered list with maybe 7 or 8 list items (the exact number varies from section to section). Each list item, in turn, contains an H3 heading and a paragraph element. The client will want to add more sections later.
Two solutions of how to structure this seem obvious, but each has distinct downsides. They are:
1. Each section is one channel entry, and the channel’s custom entry fields consist of a long chain of ‘heading’ and ‘bodytext’ pairs (heading_1, text_1, heading_2, text_2, etc) with the headings being text inputs and the body text fields being text areas. This prevents the client from having to deal with any markup (they are not HTML savvy) because each field’s variable can be placed inside the appropriate HTML tag in the template. However, it also makes for a horrible, unwieldy publishing page. It also means that I have to anticipate the maximum number of list items and provide at least that number of heading/bodytext pairs, and the template becomes a morass of conditional statements to ensure that no empty H3 and P tags are left on the page if an entry uses only a few of the header/bodytext pairs.
2. Each section is one channel entry, as before, but this time the channel has only one custom entry field, and this holds the content together with its structural markup—that is, everything including the OL, LI, H3 and P elements. This makes for a much simpler template and a less confusing publish page, but it introduces html into the publishing field and I can see that going horribly wrong as soon as the client tries to update the User Guide themselves.
I can’t believe that this is an uncommon scenario, so I’d love to hear how others have approached it.
Many thanks,
Rick