But as the asker of the question realized, this actually causes the entire Tridion GUI to be loaded into the shortcuts area! Definitely not what we want to do!
Luckily for us, Anguilla has a way for us to unload the lists which will automatically cause them to reload. If we want to refresh all of the lists inside of the shortcuts area, we can do the folllowing:
So what’s going on in the above statement?
$models.getItem("cme:userfavs") retrieves the shortcuts area which is represented by the type
Tridion.Cme.Model.FavoritesFolder. This object contains the method
unloadLists() which does the magic for us. But suppose you only want to refresh a specific list in the shortcuts area?
$models.getItem("cme:shortcuts").unloadLists(); $models.getItem("cme:custompgs").unloadLists(); $models.getItem("cme:usrtsks").unloadLists();
Again, with each of these items you can just call the
unloadLists() method to refresh that specific list. You can even target the child lists of these lists… for example,
$models.getItem("cme:chklst"); which would get the Checked-out Items from the My Tasks. If you’re trying to figure out how you can get the identifier to pass to
$models.getItem(), a good place to look is the address bar after clicking on the list you wish to target with your code. For example, after clicking on the “Checked-out Items”, you should see “
Dashboard.aspx#locationId=cme:chklst” at the end of the address bar. The value of the
locationId is what you want to use.
Happy coding everyone!