3

Lets say I have four different pages I set up on a channel to have four different directories. ie ... hello/1, hello/2, hello/3, hello/4. But they are all using the same template.

What could an engineer adjust in craft to be different between the four pages vs. not be able to adjust if they can't touch the html template or CSS?

4

You could try creating a different entry type for your "hello" section.

For example, I am building a site for a restaurant. The "food" section is a structure. Each entree is the same template, each "category" uses the same section, but a different entry type. That way the admin only has to click "new entry", then choose either "entree" or "category" as the entry type.

Each category gives me the titles, "sandwiches" "burgers" etc, then my entree type is the actual food item.

Depending on what they pick, input fields will be different, however the markup on the page remains the same.

  • If you were only going to alter the html layouts of the same field set, why not use a drop down and switch the layout with an include based on drop down value? This way you don't need to define separate entry types for each current case, and as new cases are added you'd only need create a new sub-template and configure it as an option in the drop down. This would save a lot of work if there were many fields. – Steve Adams Aug 15 '15 at 3:50
  • Yes. It's more work, but it is also more flexible as you can later change the fields available for each layout individually. And it's not that much work when the fields are in the same field group and you drag the whole group (didn't know this is possible until recently!). – carlcs Aug 15 '15 at 7:39
  • Hmm, very usefull. Some very interesting ideas I never thought of. Thanks. – Matteo Aug 19 '15 at 18:38

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.