I'm new to the Umbraco world, and have failed to find any documentation on what I want to do.
I've created a new Section and related Tree Controller. The Tree Controller is basically showing content the User is allowed to modify. What I'd like to do, is when one of the tree nodes is selected, to show the standard Content Editing view in the frame on the right.
You'll also have to add a bit of C# code to manage you tree to ensure that your designer shows up when you click on a content node. I can point that out to you too if you need a bit of help in that area as well.
So I had a look a the Merchello stuff, if I was looking at the right place, i t looks like they've essentially rewritten the Content Views, controllers, etc. Is that right? Or was I looking at the wrong bit?
I suspect what Merchello has done is write the high level stuff themselves (e.g., the dashboards/content views and Angular controllers for those dashboards), but I think they are most likely dynamically creating the built-in Umbraco property editors.
That is, I believe they are not recreating the property editor directives and the associated Angular controllers for those property editor directives.
I could be wrong, but from the little I know that is my strong suspicion.
Also, keep in mind that when I say "rewrite the dashboards", Umbraco has a number of directives to help make creating those dashboards easier. For example, there are a couple of directives that help create the tabs at the top of the dashboards and there is a directive for the editable name above the tabs.
And from what I hear, they have very recently updated the code comments so that the purpose of and usage instructions for each of the directives is much clearer. Might be worth taking a peak at the Umbraco core source code for that.
So I've decided against trying to replicate the Content Editors. Instead, I've created a new section that allows an administrator to set what a person can edit/view, but in the context of the domain.
The view backs on to a WebApi that know what permissions to set given a domain context.
The user is then restricted as to what they can see in the normal Content Tree.
Reusing the Content Editors in Custom Tree
Hi,
I'm new to the Umbraco world, and have failed to find any documentation on what I want to do.
I've created a new Section and related Tree Controller. The Tree Controller is basically showing content the User is allowed to modify. What I'd like to do, is when one of the tree nodes is selected, to show the standard Content Editing view in the frame on the right.
How do I do this?
Many thanks, John
Hi John,
as far AS I know you can't use the same view for your custom nodes. You have to create the view yourself with the editors you need.
But you can reuse the property editors that are available in umbraco like textbox, datepicker and so on.
Regards David
Merchello is doing exactly that, I believe. Take a look at their source to see how they do it: https://github.com/Merchello/Merchello
Also, here's an example of how to recreate the editing experience from the content section in your own section: https://github.com/rhythmagency/formulate/blob/b4145be9c54b8b8dad0e73de59d10ec6633e6dd5/src/formulate.app/Directives/validationDesigner/designer.html
That's the markup for the validation designer in Formulate. It looks like this:
While most of it is not relevant to you, there is some JavaScript that accompanies that designer that may be illuminating: https://github.com/rhythmagency/formulate/blob/b4145be9c54b8b8dad0e73de59d10ec6633e6dd5/src/formulate.app/Directives/validationDesigner/designer.js
And there's another HTML file that makes use of the above Angular directive: https://github.com/rhythmagency/formulate/blob/b4145be9c54b8b8dad0e73de59d10ec6633e6dd5/src/formulate.app/App_Plugins/formulate/backoffice/formulate/editValidation.html
You'll also have to add a bit of C# code to manage you tree to ensure that your designer shows up when you click on a content node. I can point that out to you too if you need a bit of help in that area as well.
Thanks, I'll have a look a that and let you know how I get on :)
So I had a look a the Merchello stuff, if I was looking at the right place, i t looks like they've essentially rewritten the Content Views, controllers, etc. Is that right? Or was I looking at the wrong bit?
I suspect what Merchello has done is write the high level stuff themselves (e.g., the dashboards/content views and Angular controllers for those dashboards), but I think they are most likely dynamically creating the built-in Umbraco property editors.
That is, I believe they are not recreating the property editor directives and the associated Angular controllers for those property editor directives.
I could be wrong, but from the little I know that is my strong suspicion.
Also, keep in mind that when I say "rewrite the dashboards", Umbraco has a number of directives to help make creating those dashboards easier. For example, there are a couple of directives that help create the tabs at the top of the dashboards and there is a directive for the editable name above the tabs.
And from what I hear, they have very recently updated the code comments so that the purpose of and usage instructions for each of the directives is much clearer. Might be worth taking a peak at the Umbraco core source code for that.
Hi John,
I gave a presentation on creating custom sections with Angular at the 2014 Umbraco UK Festival.
The code and the video of that presentation are still online : https://bitbucket.org/dawoe/umbukfestival2014/
https://www.youtube.com/watch?v=_sX9eZSn9HI
I think most of the things I show in there are still acurate and can be a good starting point.
Dave
So I've decided against trying to replicate the Content Editors. Instead, I've created a new section that allows an administrator to set what a person can edit/view, but in the context of the domain.
The view backs on to a WebApi that know what permissions to set given a domain context.
The user is then restricted as to what they can see in the normal Content Tree.
is working on a reply...