A quick distraction from navigation patterns this week:
A while back I wrote a bit about issues with following the SDN instructions to create a new custom application on your Sitecore "start menu". Recently I responded to a Stack Overflow question about this issue, where after a bit of discussion I discovered that this didn't work quite the same way on Sitecore 7.5. So having investigated why, I figured I should write this up...
As discussed in the original post, SDN says there are two bits of data that need creating for a custom entry on the "start menu":
When you navigate to
and create an instance of the
template you need to fill in the "Application" field with a path to the
file for your application.
Intuitively you might type in a path like
- but clicking "save" after you've done that will make the value disappear again. You need to click the "Insert External Link" button to insert the path:
Clicking save after this will work, and save the data. Under the surface, the raw value of the field will hold XML:
Secondly, you have to add the "start menu" entry itself. You create the an entry in your preferred location under
/sitecore/content/Documents and settings/All users/Start menu
/sitecore/templates/Sitecore Client/Applications/Application shortcut
template - and again have to fill in the "Application" field.
This time you're selecting a Sitecore item – so you'd expect to click the "Insert Link" button, and choose the item created above. But,
as discussed in the previous blog post, when you do so you get an unexpected
extension added to your link:
Again, just editing the value here and clicking "save" won't save the change. And you can see why if you show raw values: An internal link is set up by default with an ID. Having fiddled about a bit it turns out that to get the right data into the field you need to do two things: First click the "Insert External Link" button and paste in the path to your target Application item into the URL:
Click "ok" to create data for an external link. But for our shortcut to work it needs to be an internal link. So then secondly you need to modify this. I've found you can turn on the "raw values" view, and manually change the
attribute from "external" to "internal":
You can then save the item, refresh the page and your custom start menu item will appear:
It's important to note that making this manual edit will make your start menu item appear, but it will also mean that the data is wrong from the perspective of the field editor buttons. If you click the "Insert External Link" button the popup's URL field will be empty. And also if you click the "Insert Link" button you'll get an error:
So take care if you need to come back and edit this data again later...