Cms: Feature Request: Control of position of new entries in Structure Section Types

Created on 2 Apr 2021  Â·  10Comments  Â·  Source: craftcms/cms

Description

When adding entries to a section of structured entries, new entries are currently appended to the end of the structured list of entries. When creating a section, I would like the option to choose between appending new entries to the front or end of the list of entries.

authoring enhancement

Most helpful comment

A per-section setting seems logical to me. I see ordering-priority as simply another option when modeling content to suit the needs of a site or app.

All 10 comments

It would be great if there were some sort of config setting to choose "add to top" vs "add to bottom". Not sure if that config setting would be better suited for the config/general.php file, or for each Structure individually.

This was already requested by #870. Just resolved for 3.7 – see https://github.com/craftcms/cms/issues/870#issuecomment-812743064.

Was this resolved with the context menu changes only, or was a setting also added for the default behaviour?

Just the new action options. So I guess I will reopen this if there’s still a need for the section setting. Not sure how I feel about it though… the inconsistent behavior from one section to the next could be confusing.

A per-section setting seems logical to me. I see ordering-priority as simply another option when modeling content to suit the needs of a site or app.

Not sure how I feel about it though… the inconsistent behavior from one section to the next could be confusing.

Structures can be used to represent vastly different kinds of content, even within the same build. If new entries being prepended is in fact the most natural or expected behaviour for a particular section, I doubt authors would be bothered by the inconsistency.

I fully agree with @johnfmorton and @mmikkel, a section-level setting makes perfect sense to me. We can't guarantee that all sections in a site will require the same behavior.

Would you agree that the setting should be applied in each of these cases?

  • When creating a new entry via the “New entry” button
  • When creating a new entry via the “Create a new child entry” action
  • When repositioning an entry via its “Parent” field on the Edit Entry page
  1. Yes, absolutely.
  2. Yes, probably, though it's an interesting question. It's probably easiest to have the logic "trickle down" to each branch, and theoretically it's a bit easier to rearrange a subset of entries within a given branch.
  3. Yes, probably. I believe all of the same logic from 2 applies here as well, since it's a similar Parent/Child relationship.

The first two, definitely. If a section is configured to prepend new entries, I think it's reasonable to assume that authors and devs will expect this behaviour to apply regardless of level.

The third one is a bit more awkward, though I'd probably vote for keeping the behaviour internally consistent – i.e. if Craft at any time, for any reason, needs to insert an entry into a structure or child element hierarchy without a known position, it should put it either first or last depending on the setting.

Not completely sure though. I do think the first two use cases are probably the most prevalent, and it could make sense to only have the setting apply for new entries as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davist11 picture davist11  Â·  3Comments

bitboxfw picture bitboxfw  Â·  3Comments

brandonkelly picture brandonkelly  Â·  3Comments

benface picture benface  Â·  3Comments

angrybrad picture angrybrad  Â·  3Comments