It seems that I’ve a very common question. But I’m still thinking about a “out-of-the-box-best-practice”-solution for Document Node lists in the backend. And I need help to clarify it.
Coming from TYPO3 I’m still affected by TCA and simple list management where I can show always the last created items on top and do not have to think about a high amount of datasets in future.
In my actually case I think about how to manage “News”-Documents. I just have a Document Node “News” and under this an unlimited count of Document Nodes which presents single News-Items. But this is not really a good solution. What will happen, if there are one day 10.000 news-items? Will it kill my site?
I know I could also write a small Flow-Domain-Model-Extension for this to keep it more simple and get a manageable list. But this is not my intention.
So I’m still thinking about, what the currently best practice NEOS-on-board node-based solution for a common matter like this? For simple news management?
Does I really have to create more folders to take the control about the document tree and an unlimited count of News-Nodes? So I have to create under “/News” the Folder “/2020” to add all news of 2020 there. One year later I create the Folder “/2021” and so on?
a) Is this best solution so far without creating some special stuff?
b) And related to this: Is there any possibility to order the news INSIDE THE TREE by their date? Or by their title? I’ve concerns what happen, if some backend users will do whatever they want. How do I control this, that a Document Node list has a fixed order to avoid some mismanagement and confusion? What can I do, that a single News does not disappear between 200 other news?
In my opinion, the most elegant solution we currently have is the FlatNav package. We use it in a lot of projects for exactly this use case. You can use FlowQuery or Elasticsearch for fetching, sorting and searching the data.
I presented this package at a Neos Meetup, see this video (at minute 129) if you’re interested in learning more. (At this time, search wasn’t integrated yet, in the meantime this is available.)
There’s currently another further development on the way which will allow you to show/hide flat navigations based on roles. This will allow you to e.g. hide the Category tree from normal editors.
Before using FlatNav, we used the Listable package to display such lists in the content area (and only in the backend). This might be an alternative, however I think FlatNav is way better for this use-case.
Just as a side note, but maybe you know that already: In the Node Type definition, you can override how the label of a node is rendered in the backend. So for your news, if there is a date, you can prepend the news title with the formatted date.