6

Right now I'm in the process of expanding our experience editor functionality. I've followed these articles for adding chrome around renderings and placeholders, and now I'm trying to extend this functionality further by inserting a custom button at the bottom of my placeholders that will let the user add a rendering.

Basically, this button should do the exact thing that the "add to here" buttons do - pull up the "select a rendering" window - but it will always add the component to the bottom.

My current best lead is to use the webedit:newrendering somehow. I've tried creating a button in the following way:

<a class="btn btn-default" onclick="javascript:Sitecore.PageModes.PageEditor.postRequest('webedit:newrendering(id=@({renderingID}))')">Add New Rendering</a>

Unfortunately this doesn't work at all. Again, ideally this button would just do the same thing as the "Add here" button when you click a placeholder in the experience editor, and I realize the code I've written wouldn't do that even if it did work.

Your Answer

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

Browse other questions tagged or ask your own question.