8

I'm creating a GUI Extension with the Alchemy4Tridion framework and want to open a popup. The problem is the popup file is installed in assets/popup.html by Alchemyand not assets/views/popup.html. How do I get the file to be deployed to the /assets/views/ folder?

My file structure is /Static/Scripts/Command.js and /Static/Views/popup.html. In the Views folder I have a popup.html file.

In my ResourceGroup.cs file I have the following:

   AttachToView("popup.html");
   Dependencies.AddAlchemyCore();

In the Commands.js file, execute function I use the following to open the popup:

 var itemId = selection.getItem(0);
 var url = "${ViewsUrl}popup.html?item=" + itemId,
 popup = $popup.create(url, "menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=405,height=180", null);
 popup.open();
1
  • Not sure if it`s a problem for your requirements, but I wrote a quick article on reusing a popup for an A4T Command.js otherwise if you click the button that opens a popup, you get a new one every time you click the button. tridionted.blogspot.co.uk/2015/10/…
    – Mark
    Oct 10, 2015 at 21:22

1 Answer 1

9

It appears that Alchemy does not yet pick up HTML files. Try creating it as an ASPX file instead. Static HTML files are often cached a little too aggressively by the browsers anyway, so you might want to avoid them in any case if you plan to do anything dynamic in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.