API
Version 7.x > API > Repeater in CMSDesk>My Desk page View modes: 
User avatar
Member
Member
benlavrof2000-gmail - 9/17/2013 1:55:08 AM
   
Repeater in CMSDesk>My Desk page
Hi,
I have created a new page under CMSModules>MyDesk by copying the "Recent.aspx" page and renaming it.
Now I am trying to put a repeater in this newly created page. The repeater shows correctly but the "New", "Edit" and "Delete" buttons of repeater in edit mode do not work with javascript error "Uncaught TypeError: Object [object global] has no method 'NewDocument' ". It seems that some javascripts which should be in the page through master page or registering by code are not there. Could please shed some light on this issue.
Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/17/2013 7:33:46 AM
   
RE:Repeater in CMSDesk>My Desk page
Hi,

the problem is that you are not on a content page so the repeater and the scripts ensuring the buttons do not have the context required. Also, why would you like to have the option of creating new documents here instead of in the content tree?

Anyway, a customization of the repeater or creating custom web part will be required and change the view mode checking.

Best regards,
Juraj Ondrus

User avatar
Member
Member
benlavrof - 9/24/2013 2:39:09 AM
   
RE:Repeater in CMSDesk>My Desk page
Thanks Juarajo for your reply.
What we are trying to achieve is some sort of administration page under CMSDesk. An specific user (which we will define by using "UI customization") would be able to login to CMSDesk and instead of seeing whole tabs and content tree, she would just see a custom page with a repeater inside it (and also some custom ribbons on the top of the page) which gives her the ability to add/edit/remove items and also action on workflows and etc.
We are hesitant to use contribution list considering its limitations and because we are trying to simplify the UI for this specific user, using CMSDesk default "Content" page it not an option for us.
How can I create an instance of "content page" to have all the right javascripts registered in my page by default?
at the moment the MasterPage in my custom page is: ~/CMSMasterPages/UI/SimplePage.master

and my page class inhertis from: CMSDocumentsPage
public partial class CMSModules_MyDesk_Custom_Recent : CMSDocumentsPage

and the page is an exact copy of \KenticoCMS7\CMSModules\MyDesk\Recent\Recent.aspx copied to \KenticoCMS7\CMSModules\MyDesk\Custom\Custom_Recent.aspx

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/24/2013 2:54:56 AM
   
RE:Repeater in CMSDesk>My Desk page
Hello,

This is pretty complex task to achieve. I would rather create a custom module for this and ensure everything in the API - since you woulod have to use the same API to customize the repeater.
Anyway, why CMS Desk -> Content is not an option? Using the UI personalization you can also hide the tabs you do not want to have for given user and also you can limit the content tree nodes only to those items the user/role has access to.

Best regards,
Juraj Ondrus

User avatar
Member
Member
benlavrof - 9/24/2013 4:15:28 AM
   
RE:Repeater in CMSDesk>My Desk page
The page ideally should contain a paged list of all items (e.g. all news in site) and give the user search/sort/filter ability. Inside the list user should be able to add/edit/remove items by clicking on each item and preferably seeing a pop-up window (for edit). Also user should ideally see the current workflow status of each item and be able to action on each item (e.g. approve, reject, resend for another approval) inside the same list and by clicking on some icons in "Actions" columns of the list.
I am not sure if I know enough about how to achieve this in CMSDesk>Content page. Could you please give me some ideas and guidelines?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 9/17/2013 7:35:24 AM
   
RE:Repeater in CMSDesk>My Desk page
How are you accessing this page? Where is it in your file system? I'm able to copy the page, rename it and display a list of documents without an issue on it's own and within the CMSDesk although by default there are no Add/Edit/Delete buttons so I'm not sure where those came from.

User avatar
Member
Member
benlavrof - 9/24/2013 2:51:21 AM
   
RE:Repeater in CMSDesk>My Desk page
The page is an exact copy of \KenticoCMS7\CMSModules\MyDesk\Recent\Recent.aspx copied to \KenticoCMS7\CMSModules\MyDesk\Custom\Custom_Recent.aspx.
I have put a repeater in this page and am able to see all the current items in the repeater and also add/edit/delete buttons (by activating edit mode of the repeater) but since required javascript files are not registered in this page the buttons do not work.
I am trying to figure out which javascript files do I need to register in order to have the page working properly. I have tried some javascript files that I could guess from other similar pages with no success so far:

ScriptHelper.RegisterScriptFile(Page,@"~/CMSModules/Content/CMSDesk/Content.js");
ScriptHelper.RegisterScriptFile(Page,@"~/CMSModules/Content/CMSDesk/ContentEditFrameset.js");

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 9/24/2013 9:11:58 AM
   
RE:Repeater in CMSDesk>My Desk page
As I re-read the previous posts, I'm with Juraj on this one. What you want to do is re-create the CMSDesk in a format one client wants. Sure it can be done but is it really worth the effort? Not only will you need to create your own custom files in the CMSModules and/or CMSFormControls and/or CMSAdminControls but you will have to recreate all the modules and permissions within the UI.

One other option would be to look at the actual control that is used in the page you mentioned (/CMSModules/AdminControls/Controls/Documents/Documents.ascx). In there you should be able to learn how it is to be used and how you can benefit from the already built controls.