-
MODX Staff
- 2,502 Posts
I don’t know if this is possible but I have a client who has a News page as a parent. The parent has a complex ditto call with pagination and they’ve already accidentally overwritten it once. I want to lock this document but doing so won’t allow for the creation of new child documents (the news items).
The News document’s context menu won’t give access to "Create Document Here" and therefore the client can’t create a new News Item.
Is there a way to protect the parent and still allow the creation of child documents?
Does this need a feature request?
Is there a workaround or plugin that could handle this?
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
Try setting "Show protected pages" in Security > Tools > Configuration to "yes".
You can also tell him to use the top-left button to create a new document, then move it later to that folder (might be problematic because he most likely needs to remember to switch to a certain template too).
Or: put your Ditto-call in a chunk, that’s less likely to be corrupted or overwritten.
Or: create a special template for the parent doc and hide the Ditto-call there.
-
MODX Staff
- 2,502 Posts
@ganeshXL
Thanks very much.
I’ve shown the protected docs. This is how I realized I couldn’t add a child to a locked parent.
I’ve moved the ditto call to a chunk and just had the eureka about using a template for the parent.
I do think though that this might be a great feature (if not too hard to implement).
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
Hi guys,
This is interesting. Could you please explain your solution. I don’t get the part about creating a template for the parent document...(being Friday n’all). Do you mean a modx template? A ditto template?
Thx...
/k
-
MODX Staff
- 2,502 Posts
Just create a new template (Resources>Manage Resources>New Template) and then remove all the content fields and hard code the ditto call or a chunk for the ditto call.
This way if the client edits any part of the document it won’t appear on the output.
It is not a perfect solution because if the user edits the alias it could break the search engine results and create 401s because it won’t exist anymore.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
Thx guys, appreciate it....