2

I've created a custom SPEAK 2.0 dashboard that lists sitecore items for a specific template.

This dashboard was created for low level content editors which will only manage (create, edit, delete & publish) those items.

I want to add the following functionality but I'm completely stuck at the moment...

When you click on an item, it opens the content editor so you can edit it


Something useful that I already found: setting a HTML template on a DataField as shown by Martina: https://mhwelander.net/2014/07/03/speak-for-newbies-part-5-building-a-custom-form-3/

Locate the HTMLTemplate field and add the following:

<a href="/sitecore/client/Your Apps/Properties/AddEditProperty?id={{itemId}}">{{Location}}</a>

{{Location}} is the name of the field we want to output, and {{itemId}} is a standard token which will be replaced by the ID of the item in the row. Lastly, delete the contents of the DataField field. If you leave this filled in, the contents of the HTMLTemplate will not be output. The ‘Location’ text of each row will now link to the ‘Add/Edit Property’ page.

Reasons for not choosing to create an edit page for the item in SPEAK:

  • no default rich text editor (there is a plugin though)
  • no default datepicker field
  • I have no idea on how to handle versioning
  • ...
  • 1
    Answer 1. If you know what is the ID of an item you click on ( I don't know what type of control you are currently using) you can simply redirect user using this url: http://domain/sitecore/shell/Applications/Content%20Editor.aspx?sc_bw=1&fo=ID, where ID value in query string is an item id (for example: {3C1715FE-6A13-4FCF-845F-DE308BA9741D}) – Alan Płócieniak Oct 28 '16 at 9:21
  • Though not tried myself, I wonder if the functionality in Experience Editor for "Edit related item" which opens up a minified Content Editor window for that item couldn't lend a clue. – Pete Navarra Oct 28 '16 at 11:51
  • @AlanPłócieniak I've implemented your solution and that does work. If you post it as a response, I'll mark it as a correct answer. – Koen Heye Nov 9 '16 at 21:03
3

If you know what is the ID of an item you click on you can simply redirect user using this url:

http://domain/sitecore/shell/Applications/Content%20Editor.a‌​spx?sc_bw=1&fo=ID,

where ID value in a query string is an id of an item you want to open

for example:

http://domain/sitecore/shell/Applications/Content%20Editor.a‌​spx?sc_bw=1&fo={3C1715FE-6A13-4FCF-845F-DE308BA9741D}

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.