Back End Edit Form

Charles Matvchuk asked on March 3, 2015 06:23

Perhaps I am over complicating it..... I have a requirement now to create a simple experience for someone to edit events in the back end (Admin System). I can whip up a custom module, but for this they do not want to use a custom module. What they want is for the user to log in, go to the admin, not to see the tree, or maybe just the events page, hide everything else and see a list of events so they can manage them as well as add new one's. Again they do not want any custom code, I need to use everything in Kentico. I have experimented with Security (Yes I am checking page security), but it doesn't work out right, since I cannot hide the pages below the root, unless I Deny Browse Tree on the Root Master which hides everything. If I set Read to Deny on the pages, it correctly hides them in the tree, but in the live site they are hidden as well. If there was a setting to hide in tree but show live, it would have worked. This also may have worked if was able to do such and then just create a page with a listing web part and an editor form and just require authentication and security set to the proper role and only show it in the back end Tree, hiding everything else.

I am so used to creating custom modules and forms, perhaps I am overlooking something that would allow me to accomplish my requirement.

1) User must be able to view all areas of the live site. 2) User will login into the back end system (admin). 3) User should only see, if using the tree, the root and/or the events page (which is directly under the root. 4) They should see a list of all events, a way to edit the existing events and a way to create new events. 5) Optimumly they should see just a tile that says events, when they click on it they are taken to a list of all events (which are located under one node only), and a way to just edit, create new event. Also the tree should not be viewable. (This last one is the best solution, but 1 through 4 will suffice).

Any suggestions would be appreciated.

Correct Answer

Charles Matvchuk answered on March 3, 2015 07:40

Virgil, I may have a solution that I would like to share, although if anyone has a better way, please let me know.

I created a module without any class fields. I followed the directions in the documentation exactly, except I didn't give it any class fields. I called it Event Manager. Then I created a new web part under the UI section under Edit category, and I inherited the user contribution web part (actually I have tried the grids with the same success as well). Then I went into my new module, into the User Interface and added a new ui element (under custom as the documentation explains) and under Element Content I set type as "Page Template" and Page Template I selected blank. Then on the properties tab I selected the object type of "Page(cms.document) and left Parent object type to automatic. On the design tab I added my new web part and set all the proper settings, don't forget the most of your existing CSS won't work in the admin unless you have it hooked in, or you need to add your css to the web part. Finally go in UI Customization and make sure you have enabled the role to see the custom module. It will appear under custom in your slide menu or you can put the tile on the home page.

Obviously this was a test. But I am quite pleased and it seems that we can duplicate any type of operation or web parts we need into modules so that I do not have to show the tree. Basically we can implement a full crud interface with showing the tree.

If I missed something let me know.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Virgil Carroll answered on March 3, 2015 06:44

Charles I have to imagine you could use some variation of the contribution list webpart to get the functionality you want, but not sure how you could roll that out as the only thing viewable via the admin interface.

We've had similar client requirements and have opted for using the user logon process and locking down access to a private area of the live site to edit a list of events. If you can avoid having the user login to admin, this could be an option.

The only other thought I have is could you use the user interface personalization to hide everything you needed. I have honestly not tried to hide everything so I cannot tell you if that would work.

If you stick with the admin method, I would be interested in how you solve your requirement.

0 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on March 3, 2015 06:56

Virgil, I like your idea of locking down a section and letting them just edit it live on the website. Unfortunately, it was proposed and rejected. The reason is, is that there is a custom module for contact management and lead management. Also they are using the e-commerce modules to take orders in the back end. The events person will have more responsibility down the road and may be using other modules. They want a unified experience.

I figured perhaps I was over looking something.... To create a simple UI with listing and crud operations for a particular document/page type should be a no brainer with existing controls, without showing the full tree, I the admin interface.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on March 3, 2015 07:03

I understand with that I have to imagine you will have to write something yourself. You could at least use the contributor webpart code behind to get you a ways down the path.

As far as locking down the admin interface that much. I will defer to others thoughts who might know better.

The only 'hack' that comes to mind would be to write some code to test for the user and hide the interface components yourself, but that would be an awful complicated Chiefs to write.

Sorry I don't have a better thought.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on March 3, 2015 16:09

That is definitely an interesting solution and it makes sense. So when you say you are not showing the tree, you are limiting that users permissions to only the page where you added the module UI correct? Is the user still going to see the root element?

0 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on March 3, 2015 16:21

Tree doesn't need to be shown, nor the root element, it is considered a module with its own tile and menu. Basically, when the user logs into the back end, they have their tiles and their menu on the left on the slider navigation. I have created 6 different editing interfaces now, which the use can see and use plus the standard modules, like abuse reports etc. They never need to see the tree, which will confuse them.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on March 3, 2015 16:26

Ah, sorry didn't catch that part of your earlier post, so you are using the admin interface tiles! Very nice.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 3, 2015 17:27

I started playing around with this a bit and it looks like it will work and I like the approach Charles. Have you found out how to get the events from the tree yet? I know there are Node and Page objects to choose from in the module but you can't choose from a page type. I wonder if you couldn't create a class that inherited from that Event page type?

Also thinking about how to update the event data itself because I don't believe either the Node or Page objects have that coupled data with it. So maybe a query that gets the list of events and a link that points to the event class object for editing?

Please post back and let us all know how it turned out!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.