How do I retrieve selected assets from the product views of DzSmartContent

Ok, this works fine for the File tab of the smart contents pane, but how do I retrieve the same information from the product content tab or from "Explore Product..."? I've been dumping the JS objects, trying any method that seems related, but I can never get what I'm after. Any help will be greatly appreciated.

var oPaneMgr = MainWindow.getPaneMgr();var oSmartContentPane = oPaneMgr.findPane("DzSmartContentPane");var oFileTab = oSmartContentPane.getFileContentTab();var aAssets = oFileTab.getSelectedAssets();for (var i = 0, n=aAssets.length; i < n; i++) {	var oAsset = aAssets[i];	print(oAsset.displayName);}

 

Comments

  • I ran your code and discovered a couple of interesting things. 

    First, I was unable to find documentiation on the DzPane getFileContentTab() method. But it works! I wonder if it's a deprecated method or something?

    Your code does retrieve the asset objects just fine, but only if you first select items in the Smart Content pane prior to running the script. Not sure if this helps.

     

Sign In or Register to comment.