2

I need to add a new button in the custom experience button. I watched some https://www.youtube.com/watch?v=D6jqqaBMu0s regarding the field editor button. That field editor gives you option to only edits the fields that are in your page (template). Is there a way that i can edit the Datasource item fields.(Renderings)

So if the user goes in Experience Editor click on the rendering(example Standard Dynamic Directory), The ribbon comes up. (Custom experience buttons)

My button should be in the Custom experience buttons and if some one clicks on the button, the Description field under the Editor Options for the rendering should come up in the RTE and the user should be able to edit and save the values. Thanks

enter image description here

enter image description here

0

Datasource item fields can be mapped to Custom Experience Editor Buttons, in the same way as Page item field.

Step 1: Switch to the Core database, navigate to /sitecore/Content/Applications/WebEdit/Custom Experience Buttons items in content editor.

Step 2: Create a new button item, using /sitecore/templates/System/WebEdit/Field Editor Button template.

Step 3: Fill out all four fields, Header, Icon, Fields, Tooltip. Fields is the important one here, as we need to add the field title name. (In your case Description is the field which is of RTE)

Step 4: Switch to master database, and navigate to the component (sub-layout/rendering, in your case Standard Dynamic Directory), and map the newly created button using Experience Editor Buttons field.

Step 5: Now go to experience editor, and edit the component, you should see new Edit button, using which we can edit Description field.

  • 1
    HI Gopi, The answer you gave only works for the fields that are on the page(template). The field i want is on the Renderings. If you go to renderings, click on add a new controller rendering then you see the under Editor Option the Description field. I want that value to come up. – Mr Sumo Sep 17 '18 at 18:18
0

You should be able to do this with an edit frame

You use the EditFrames feature like this:

@using (Html.EditFrame("/sitecore/content/Home", null, "My custom title", "My custom tooltip", "cssClassName", null)) { <p>Inside of edit frame.</p> } 

The parameters are:

  • DataSource
  • Buttons
  • Title
  • Tooltip
  • CssClass
  • Parameters

You can pass the DataSource parameter in the following formats:

  • /sitecore/content/Home {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}

  • RenderingContext.Current.ContextItem.ID.ToString()

  • RenderingContext.Current.PageContext.Item.ID.ToString()
  • Html.Sitecore().CurrentRendering.DataSource

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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