-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow querystring parameters to set IsElementType checkbox on create document type route #6779
Allow querystring parameters to set IsElementType checkbox on create document type route #6779
Conversation
…' the default checkboxes for either Is an element type or Allow varying by culture
Hey @marcemarc , Thank you for the PR. We shall review it and get back to you if anything more is needed. Poornima |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @marcemarc,
This works like a charm - definitely something I could use my self 👍 😍
Anyways, while testing this I spotted that it's possible to noTemplate
via the model passed to the editor service:
Wouldn't it also make sense to add support for isElement
and allowVaryByCulture
there as well?
@abjerner Yes I spotted that too, to be honest, I wasn't sure how the new create Document Type view could be created from the context of an infinite editor? so wasn't quite sure how to test making that change, or whether it made sense. |
@marcemarc it appears that you can call But the documentation doesn't really have any more information beyond that the function exists. I'll try to look a bit more into it ;) |
@marcemarc I did some digging, and it seems that a create dialog can be opened by specifying both editorService.documentTypeEditor({
id: -1,
create: true,
noTemplate: true
}); From what I can tell, there is no part of the Umbraco source code that actually opens a document type create dialog like this. But there might be in the future, or a package might use it, so I think adding |
not sure where this is used, but in theory this might be useful to be wired up too?
@abjerner thanks for the digging, I couldn't envisage where it would be used... so it's good to know it isn't... less worried about changing it now - so I have pushed a change, that I think would make this possible via the infinite editor, though I'm not sure how best to test ... |
src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js
Outdated
Show resolved
Hide resolved
update the model properties to follow camelcase, ignoring the existing notemplate that doesn't!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcemarc thanks again. Should be good to merge now 😉
Thanks @marcemarc and @abjerner ! 👍 |
sorry... @nul800sebastiaan but I think you are expecting me to do something different now each time, and I don't want to disappoint :-P |
😂 I was indeed waiting for that! |
Prerequisites
Relates to issue #6410
Description
Some of the cool Umbraco folk I know were chatting around the issue #6410 which is essentially is 'all about' adding to the Create Document Type options, a super fast way to create an Element Type, instead of having to create first a Document Type Without Template, and then remember to manually check the Is An Element Type checkbox on the permissions tab...
... why can't they just have a new option to do that on that menu ... speed up everyone's daily workflow...
... well there are concerns on how to present these options, in a way that doesn't confuse people new to Umbraco (what is a Document Type Collection anyway? etc)... which will involve some due consideration and perhaps an RFC...
... anyway in the meantime, devs are pulling their hair out, everyday, right click create, document type without template, permissions check is an element type and they are getting frustrated, and well I don't know just how far this is going to escalate...
So this PR doesn't address the menu, or adding that in... there is a whole lot of discussion required first - so what does it do? and why am I proposing it?
This PR, updates the DocumentTypes edit.controller.js to look on the querystring for two new parameters
iselement
&
culturevary
if these parameters are set to true on the querystring, then the checkbox toggle for 'Is an Element Type' and 'Allow varying by culture' will by default be also set to true.
This changes nothing for day to day creating of Document Types! - nothing is visible to anyone via the menu, shhhsshsh nobody needs to know this change has happened... just merge it in... nobody will know...
... but what it enables is a cool kid package developer to experiment with the options for this menu... to allow a 'power tools' document type options plugin to be created - that can perhaps enable evolution in the realm of the package sphere to identify and test the long term improvements required to be made to this menu in the core product... in the short term, devs can have a boost to their productivity, whilst buying some time for the longer term considerations...