1

I have a section (or structure, works both) for "events". On the archive template (see image below) I want to add a custom image in the header. The administrator needs to be able to upload the header image.

Events page

In a section/structure there is no dedicated page, so I cannot assign custom fields to it. How do I tackle this problem?

2

What you could do is make a "Global" Which sets the header image. You could name the global something like "Event Page Fields" or something like that so its clear for your administrator where to look.

The other option is creating a Single page and load all the structure items via the template there. This way you can add the image field to that single.

  • That is an option indeed but it feels quite a lot like a workaround to a problem that is very mainstream, no? – Warre Buysse Mar 31 '17 at 11:31
  • Personally I make a single for all my Overview/show all channel items/structure pages. This way you can always let your client control what content is displayed plus how else would you be able to define any SEO information on there? Best way is just to create a Single – Justin Dekkers Mar 31 '17 at 11:37
  • But you cannot name the single "events" as it's taken by your section? So you end up creating something like event-archive? – Warre Buysse Mar 31 '17 at 13:05
  • You could name it something like Event Overview but still have the same url – Justin Dekkers Mar 31 '17 at 15:12
1

There are three ways you can make that page editable:

  1. Create "Global" custom fields which are then pulled into that specific template. This may not be overly intuitive for the administrator, however, and clutters up the Global settings pages.

  2. Make the page a "Single" which has the custom fields applied there

  3. Make the page an additional "Page Type" within your structure (or channel) – so your structure might be made up of "Event List Pages" and "Event Pages". This new page type can have a different set of fields to the other page types. You can place the "Event List" at the root of the structure and individual events underneath – this has the added benefit of fitting in nicely with breadcrumbs and menu navigation, and it also easy for administrators to find where to edit the page.

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.