3

I've got a site with one base URL that is run on one Craft instance. The site is for a yearly event and each year the header / footer / body page elements / design are different. However, we want to keep all previous years pages in existence with the look and feel of that year so people can look at that page exactly as it existed in that year. URL structure would be something like example.com (current year), example.com/2017, example.com/2018, etc.

However, there are some of consistent codebase elements that I would like to have as easily editable for each unique year. For example, SEO elements like meta descriptions and social media descriptions should be unique for each year, while still being easily updatable using the same field across individual year entries.

What I'm debating is the best way to set this up in Craft to balance site speed and overall manageability. A few options I'm thinking about:

  1. Do a different entry and layout for each year and then reuse the individual fields that need to be editable across all pages in the different templates.

  2. Do one base template and then use conditional logic that swaps in the CSS, header structure, footer structure, etc. for each year. Would also somehow need to have multiple matrix fields available in this to add unique content structure for each year. Concerned about lots of database queries for this one and impact on site speed.

  3. Some sort of hybrid approach leveraging different entry types across template(s) but not exactly sure what that would look like.

Other suggestions on approach or thoughts about which option is better? Thanks!

5

Option 1 is a safe bet. This allows you to have completely separate, editable templates for each chosen year. You can then change the page slug to match the year of that page. You can reuse fields year over year if you'd like or create new fields for each year. Plugins like seomatic will help you create individual SEO content on a per template basis.

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.