Closed LilyFoote closed 7 years ago
Rather than a route moving as a side-effect of changing a slug or parent, I think that we should implement helper methods (with related admin views) for:
I've not yet worked out the UI/API for these, but I hope that they will mean that we can keep url
a unique field. These would depend on the reshuffle in #75 that intends to drop the slug
and parent
fields.
... (I forgot to address the idea of inactive routes for content preparation.)
The idea of active routes is apealing, but I wonder if it might be a good idea to delegate this to the concrete Route types rather than make it a part of the base Route. This would allow subclasses to define their own behaviour for what happens when an inactive route is reached. A number of behaviours occur to me:
active
should not be boolean?)The mentioned helpers should be found in #80.
As #80 has now been merged, I think this can now be closed.
I've been thinking about the usability of Routes, and it seems to me that there is a difficultly in re-organising the structure. In particular, it currently is not possible to replace a root Route without deleting all other Routes. It is also not entirely trivial to replace a Route elsewhere in the hierarchy.
To fix this, I think we can add an
active
flag to theRoute
model. Then, instead of having one unique root Route, we have at most one active root. The same applies to having one uniqueslug
andparent
combination currently becoming at most oneslug
andparent
combination allowed to beactive
.This also has the advantage of allowing content to be prepared and not made visible immediately.
@meshy Do you think this is a good idea / the right approach?