5

I don't have commenting privileges yet, so couldn't comment on either of these posts (here and here) regarding an entry in a Structure section that links to a Channel index. Between the two posts above I think I mostly understand what's going on, but have a question about an entry type for an entry in a Structure that essentially refers to a page that is a listing of Channel entries (basically an index page for the channel).

My situation: I have an About section with a few subpages that are dropdowns links under "About" in the main navigation bar: Vision, Leadership, and Qualifications. Vision and Qualifications are basically static pages, but the Leadership page lists a number of people (with corresponding images/titles/bios). So, I created a Channel section called "Leadership", each entry containing an individual. In the About section (Structure type) I created two entry types: "about" and "leadership". The "about" entry type has fields such as "body", "hero image", and "subheader" and is used for the static entries Vision and Qualifications. However, for the "leadership" entry type I'm uncertain what fields I should put in it. Since that one entry in the "About" section exists for the purposes of building the navigation, there isn't really any content in that entry. It's just there for the navigation link, and to get the user to a template (in my case templates/about/_types/leadership.html) that will output the individuals from the "Leadership" channel.

Does it make sense that I would just create a "leadership" entry type with no assigned fields (other than the default title), or is there a better way to approach this?

2 Answers 2

5

I like what Matt P wrote in his answer:

try to consider how someone [else] will find the logic of the CMS design

The other factor you want to consider in information architecture is you only want store data once in the database. So how you intend to pull that data out also is going to influence your decision on how you store it.

The good news there is Craft really lets you pull data from virtually any place in the system very easily so it kind of comes down to an organizational choice. You have 2 options: Matrix or Entries.

Matrix Fields

You might consider a matrix field because these attach right on the entry itself. That way, a user edits the Leadership entry directly, they'll find the data there, in an intuive away. The other bonus is you can move the entries up and down in a certain order or turn them off right in the context of previewing the page.

Matrix is a good option if the data is more-or-less confined to that entry and you don't need to access the data anywhere else in the system.

Entries

If you need to relate content back to each other, or you find the leadership team data needs to exist in a context outside that particular page, it's probably the best option to bring them in as a channel (or structure).

Craft 2.5 made a huge change as to the way you can edit related entries right in the same entry. You might want to consider using an "entries" field that relates back to your Leadership channel and let the user pick exactly which team members you want to spit out on that page. The other benefit is in this way, you can open up those "related" entries right from the Leadership entry, much like a Matrix block would—enhancing usability—but you still keep them as entries.

TL;DR

I don't know how many people are on the leadership team but if you have but more than a couple dozen, it might make sense to keep them as entries. Otherwise if you don't plan to use that data anywhere else in the system, a matrix field could be a nice option too.

1
  • 2
    This was really helpful! Thanks for walking me through the approaches. Your answer, along with Matt P's, kind of turned on the light bulb for me as to how to approach it. Will go tackle it and let you know if any follow up questions. Thanks! Mar 21, 2016 at 18:56
4

Yes that makes sense. There are many ways to approach this. I always try to consider how someone other than me will find the logic of the CMS design i.e. How easy will they find Craft to actually use without me?

To make the most of what you already have, consider adding a Users custom field to your Leadership entry type. This would allow you to select the people/biography-summaries that would appear on the Leadership page.

Alternatively, if your people are Entries and not Users, then you could add an Entries custom field to your Leadership entry type and leverage Crafts relationships.

2
  • 1
    In my situation the people are not Users...a content manager will be responsible for entering each person's info. So, probably makes more sense to add as Entries (or Matrix as RitterKnight suggests below). Wasn't even thinking about adding the Entries as a custom field though...that makes sense. Thanks for the help! Mar 21, 2016 at 18:54
  • Glad we could help
    – Matt P
    Mar 21, 2016 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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