I'm following the Bart blog https://www.sdltridionworld.com/community/2011_extensions/view_in_staging_live.aspx UI customization for the pages to view the page in staging and active it is working.

I'm trying to implement the customization for the Binaries. For binaries what need to be passed ItemType? in the JS and for selecting item as Page using ItemType.PAGE.

Tridion.ContextMenus.STAGING.prototype._isAvailable = function (selection, pipeline) {
    var items = selection.getItems();

    if (items.length != 1) {
        return false;
    var itemId = selection.getItem(0);
    var item = $models.getItem(itemId)
    if (item) {
        if (item.getItemType() != $const.ItemType.?????) {
            return false;

    if (pipeline) {
        pipeline.stop = false;
    return true;

Our use case is that we are using Binaries as DCPs and we will have a configuration component mapping the location of the binaries to the Structure group which will be used for forming the URL

Any help appreciated thanks

  • Bart's extension resolves pages to their urls. For Multimedia Components you'll need to handle two scenarios for when the binary is published directly as part of a Dynamic Component Presentation or when it's used in content or a page. I think this will be more than just changing the ItemType--especially since the binary may be used in multiple locations. – Alvin Reyes Jun 8 '16 at 14:02

Binaries are simply Components (or Multimedia Components if you will), so they will have ItemType.COMPONENT.

This however doesn't help you much, you can extend the JavaScript to check if the Component is a Multimedia Component, but I'm not sure if you need to load the item for that (if you need to, you can't do that in the isAvailable check).

Furthermore, viewing a binary on your website is not something you can simply do, since the binary is published using the AddBinary command, which will have determined its exact location. So depending on your template code, that could differ for each binary (in general they are mostly published to the Publications Images location, but theoretically it could be any Structure Group).

So to make this work, you will either have to make asumptions (which might be wrong in which case you can't find your binary) or require a lot of knowledge about the binary.

What might be a better option is to upgrade to SDL Web 8, since there you have the View on site option (when you use the new Publishing Model via Business Process Types and the Topology Manager), which works for both Pages and Components (including Multimedia Components)


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.