0

I have cloned a link list rendering. Whilst I can attach a custom experience button for the experience editing to my cloned rendering - it's actually the item properties that I need to facilitate editing of. Is there a way to attach a custom experience button to here?

enter image description here

Or do I need to somehow specify the fields for editing differently against the actual custom button?

enter image description here

My template looks like this:

enter image description here

Some properties are used as attributes and hence not displayed in a way the editor could edit them from experience editor. eg: Content Position and Icon colour which are droplinks.

ie. my rendering data source is the link list with icons, which has child link items.

1 Answer 1

3

Buttons which you see in the Link edit frame are defined in the Core database. Take a look here:

enter image description here

Now investigate Link List.cshtml and take a look at the edit frame which is defined there:

@using (Html.Sxa().BeginEditFrame(item.ID.ToString(), "Link", Model.IsControlEditable))
{
    foreach (BaseVariantField variantField in Model.VariantFields)
    {
        @Html.RenderingVariants().RenderVariant(variantField, item, Model.RenderingWebEditingParams, Model)
    }
}

The second parameter of the BegineEditFrame() method defines a set of buttons (it is a name of the item I've shown in the first picture) which will be displayed in the edit frame.

7
  • Thanks for the great explanation! Do you think by adding a button to this section there's a danger on upgrading that it would get deleted? (either upgrade of sitecore or sxa).
    – Jen
    Commented Mar 21, 2019 at 2:33
  • If you want to be 100% sure that nothing will be lost than clone this rendering and modify your own edit frame buttons. Commented Mar 21, 2019 at 7:48
  • it is a cloned rendering - but where is it configured where the link custom frame buttons get associated to it ? ie. if I were to duplicate the link folder somewhere, how do I associate those buttons to my rendering on the section selection?
    – Jen
    Commented Mar 25, 2019 at 23:39
  • You can provide a custom (copied and modified) view to your rendering. Commented Mar 26, 2019 at 5:59
  • Just to be clear, I've cloned the rendering, I'm using a custom view (cshtml) and custom template. How would you tie that to a different set of edit frame buttons for the item section? It's just the edit frame link folder that I'm concerned about which is where I've added a new editor button to.
    – Jen
    Commented Mar 27, 2019 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.