Problem
It’s a common arrangement that:
- You have a model, e.g.
services
, which has every service type. - On the actual website, you have a top-level Services page, with some text, which lists all of the
service
records. - You have a separate
pages
model, which has one record for each of those top-level pages, where the top-level text can be edited – or, you have a single-instanceservices_home
model.
Currently in Dato there is no elegant way to view and edit the top-level home page text in context with the individual records for a given model. In the example above, we cannot edit everything about Services together in one section.
At present:
- You can create a Menu item called Services, which lists every
service
record. - You can create a Menu item called Pages, which lists every
page
record. - You cannot have a single Menu item called Services which lets you edit the Services home page text in context, then drill down to the individual
service
records.
Proposal
Under a model’s Additional settings, allow the specification of a single record which is considered its Home page.
This could be implemented with options something like:
- Home page? (boolean) (“Does this model have a home page?”)
- Model (select a model) (“In which model can the home page be found?”)
- Record (record selector) (selects a record from the chosen model)
Once a model has a specified record as its Home page, the effect is as follows:
If that model is tied to a Menu item, then when the user clicks that Menu item:
- The first record at the top of the view (separated out) is the selected Home page record. Clicking this presents the appropriate editor for that model.
- Below this are all the records of the model as normal