Skip to main content
added 344 characters in body
Source Link
Robin Schambach
  • 19.8k
  • 1
  • 20
  • 45

I would like to offer another solution: We always have a structured section pages where our clients can insert all the pages they want to show. It's a structured section because the menu is generated by this structure and they have certain options in these entries if they should appear in the menu/footermenu and so on.

Different Entry Types in this section have different templates, sometimes when it's required we create special field types to choose different templates as well. When the client wants to insert an "overview" page to display news he/she creates a new entry in our pages section with the entry type news that has a special template that fetches all latest entries in the news section and renders them.

That way we don't need to create a special rule and we don't need to create a single page -> thus we don't need to offer a special menu plugin. From the feedback we got from our clients they prefer this method because they have everything they need in this structured section and they don't need to create a separate menu or something like that. Dragging/moving these entries causes the menu to change and due to Craft it's very intuitive.

When it's required, we restrict the number of times certain entry types can be used. For example we only need one news overview or one login page. It does not make sense to create 3-4 different login pages so as soon as our client selects this entry type it disappears from the list and he/she can only create another login page after the first was deleted.

If you are interested: this is our default template for entries in the pages section

{% extends [
    'pages/_custom/' ~ entry.slug ~ '.twig',
    'pages/_entrytypes/' ~ entry.type ~ '.twig',
    'pages/_generic.twig'
] %}

Craft/Twig takes the first template that is found. _generic is the default content template

I would like to offer another solution: We always have a structured section pages where our clients can insert all the pages they want to show. It's a structured section because the menu is generated by this structure and they have certain options in these entries if they should appear in the menu/footermenu and so on.

Different Entry Types in this section have different templates, sometimes when it's required we create special field types to choose different templates as well. When the client wants to insert an "overview" page to display news he/she creates a new entry in our pages section with the entry type news that has a special template that fetches all latest entries in the news section and renders them.

That way we don't need to create a special rule and we don't need to create a single page -> thus we don't need to offer a special menu plugin. From the feedback we got from our clients they prefer this method because they have everything they need in this structured section and they don't need to create a separate menu or something like that. Dragging/moving these entries causes the menu to change and due to Craft it's very intuitive.

When it's required, we restrict the number of times certain entry types can be used. For example we only need one news overview or one login page. It does not make sense to create 3-4 different login pages so as soon as our client selects this entry type it disappears from the list and he/she can only create another login page after the first was deleted.

I would like to offer another solution: We always have a structured section pages where our clients can insert all the pages they want to show. It's a structured section because the menu is generated by this structure and they have certain options in these entries if they should appear in the menu/footermenu and so on.

Different Entry Types in this section have different templates, sometimes when it's required we create special field types to choose different templates as well. When the client wants to insert an "overview" page to display news he/she creates a new entry in our pages section with the entry type news that has a special template that fetches all latest entries in the news section and renders them.

That way we don't need to create a special rule and we don't need to create a single page -> thus we don't need to offer a special menu plugin. From the feedback we got from our clients they prefer this method because they have everything they need in this structured section and they don't need to create a separate menu or something like that. Dragging/moving these entries causes the menu to change and due to Craft it's very intuitive.

When it's required, we restrict the number of times certain entry types can be used. For example we only need one news overview or one login page. It does not make sense to create 3-4 different login pages so as soon as our client selects this entry type it disappears from the list and he/she can only create another login page after the first was deleted.

If you are interested: this is our default template for entries in the pages section

{% extends [
    'pages/_custom/' ~ entry.slug ~ '.twig',
    'pages/_entrytypes/' ~ entry.type ~ '.twig',
    'pages/_generic.twig'
] %}

Craft/Twig takes the first template that is found. _generic is the default content template

Source Link
Robin Schambach
  • 19.8k
  • 1
  • 20
  • 45

I would like to offer another solution: We always have a structured section pages where our clients can insert all the pages they want to show. It's a structured section because the menu is generated by this structure and they have certain options in these entries if they should appear in the menu/footermenu and so on.

Different Entry Types in this section have different templates, sometimes when it's required we create special field types to choose different templates as well. When the client wants to insert an "overview" page to display news he/she creates a new entry in our pages section with the entry type news that has a special template that fetches all latest entries in the news section and renders them.

That way we don't need to create a special rule and we don't need to create a single page -> thus we don't need to offer a special menu plugin. From the feedback we got from our clients they prefer this method because they have everything they need in this structured section and they don't need to create a separate menu or something like that. Dragging/moving these entries causes the menu to change and due to Craft it's very intuitive.

When it's required, we restrict the number of times certain entry types can be used. For example we only need one news overview or one login page. It does not make sense to create 3-4 different login pages so as soon as our client selects this entry type it disappears from the list and he/she can only create another login page after the first was deleted.