Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • J 393 posts 729 karma points
    Oct 22, 2021 @ 15:05
    J
    0

    Possible to edit a row on same page in custom section?

    I have a custom created section using the starter guide (https://our.umbraco.com/Documentation/Extending/Section-Trees/trees-v8) also utilising AngularJS.

    Is there a way to display a page with records and edit the record on the same page? Ive seen this been done where you click a record field and it goes into edit mode but not sure if this is possible or if i need to create another page with the edit functionality?

  • Søren Gregersen 427 posts 1814 karma points MVP 2x c-trib
    Oct 22, 2021 @ 15:54
    Søren Gregersen
    1

    Hi,

    There is nothing in umbraco that can handle this, since the table view is mostly used to display only a few details, to help you identity a record.

    Editing could be done via an overlay that can be opened when click the record. Look into the editorService for examples of this.

    HTH :-)

  • J 393 posts 729 karma points
    Oct 22, 2021 @ 17:45
    J
    0

    Hi Søren Gregersen

    I'm not sure what I'm looking for with the editor Service? I googled around and it seemed to be it was to do with creating a document type but as I say this is for a custom page locked down to only backend users.

    I assume I would create another .html page, loading the record in the appropriate controls and allowing the user to edit the record?

    If yes, do I just need to override the method where I add the favourite items (as per the example I posted above) and give a new page link?

    Thanks

  • J 393 posts 729 karma points
    Oct 30, 2021 @ 11:26
    J
    0

    Or anyone else? Just want to have confirmation of the correct way to have a edit page for any section pages i currently have?

    At present i believe its adding in the additional parameter but as i say, would be great to get confirmation, this is the correct way of going about this?

    foreach (var thing in favouriteThings)
            {
                // add each node to the tree collection using the base CreateTreeNode method
                // it has several overloads, using here unique Id of tree item, -1 is the Id of the parent node to create, eg the root of this tree is -1 by convention - the querystring collection passed into this route - the name of the tree node -  css class of icon to display for the node - and whether the item has child nodes
                var node = CreateTreeNode(thing.Key.ToString(), "-1", queryStrings, 
                thing.Value, 
                "icon-presentation", 
                false, 
                "ADD PATH HERE USING TREE ALIAS AND ROUTE IT T0 
                 APP_PLUGINS/MY_SECTION....");
                nodes.Add(node);
             }
    

    So if i add a path by passing in the additional parameter to a location to my section currently residing in app_plugins/mysection/backoffice etc i can add a standard HTML page call it editMyPage.html and use this area to edit the record?

    If so i dont want it to list the title of the editMyPage.html on the left menu as it should only be displayed/accessible when a record is clicked on the list of records page itself i.e.

    Record 1 Edit

    Record 2 Edit

    Record 3 Edit

    Record 4 Edit

    So assuming the above is a list page when the user clicks Edit they would be taken to a new edit page but the edit page is not listed on the left menu.

    Alternatively if this is not possible then would it be configuring the Edit link to a page through Angular on the lists page?

Please Sign in or register to post replies

Write your reply to:

Draft