1

I have a staff Structure Section with the intro page (Level 1) and individual staff members at (Level 2) as each staff member has their own page /staff/joe-bloggs.

I was wondering if it's possible to create a Matrix field to contain the information for each staff member and each 'block' to have it's own url so that each member would still have their own page? - instead of a completely separate entry-type.

This way, the staff page in the CP can become a 'single' and the staff members listed as 'cards' along with the overall page introduction.

I hope that makes sense?

Thanks

1 = Current setup, 2 = Desired setup

imagined setup

Currently the first two fields are at Level 1 an then the individual staff have an entry each.

1 Answer 1

2

Yes, you can do that in multiple ways. You can create a section and add the entry type for your staff members to it, then set the URI setting of the section to something like /staff/{slug}. Alternatively, you can add a custom route.


However, I wouldn't do that. I generally avoid putting completely separate entry types (in this case, a staff index page and individual team members) in a shared structure. The potential for errors is high, and you bind the content model to a specific site structure that may change.

Instead, I would create two sections. One channel section for members and one single section for the staff page. If you want to be able to sort the staff members, you can either use a structure instead of a section, or add an entries field to the staff index page to allow editors to pick which staff members are displayed in which order.

This gives you more flexibility. What happens if you every want to create multiple index pages (for different departments, a new office, whatever)? With this approach, you can convert the single section into a channel section and have multiple index pages that only display a subset of people. With your hierarchical setup, this will be awkward.

4
  • Hi - Apologies if i've not understood your response correctly but I have now added an image to the original question which I hope will better illustrate what i'm asking. So basically, instead of my current structure setup (1) with the intro page and staff on 2 levels, I can just have one 'single' page with the staff represented in Matrix blocks (2) rather than individually on a different level. If I did this, can those Matrix Blocks have their own URLs?
    – Martin
    Commented Apr 29 at 14:49
  • @Martin Yes, you can do that, there are two options for setting that up mentioned in the first paragraph. The rest of my answer is a frame challenge – where I recommend an alternative solution to the original problem that I believe to be superior to your current approach.
    – MoritzLost
    Commented Apr 29 at 15:05
  • I'd definitely agree with Moritz here, @Martin - The accuracy of your content model is more important than the current design & layout of the site, and the most accurate modelling of this content is not a multi-level Structure because the entries are different things from each other (a listing vs a person), nor is stuffing everything into a single entry. For the sake of your future self, store the people and the listing in two different dedicated sections. I go into more detail about why you shouldn't abuse hierarchies in my article here: cld.agency/blog/content-utopia Commented Apr 30 at 9:24
  • Thank you both, I will go down the suggested route
    – Martin
    Commented May 3 at 15:09

Your Answer

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

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