Friday, September 11, 2015

My First Alchemy Plugin - Publication Panel Search

Over the past few weeks, I have been noticing these four words "My First Alchemy Plugin" many places in the SDL community. So in my free time, I started my first Alchemy plugin as well and believe me it is a kind of addiction. Once you start it, you get involved with it more and more, so many plugin ideas starts hitting your mind, you don't mind waking up at 3 am to finish up your plugin. hmmm.. it's like Coke-en my friends :)

To start to build an Alchemy plugin, I reached out to the quick start guide at http://a4t-api.alchemywebstore.com, and after setting the project and test deployment to my local Tridion environment, it was just coding in Javascript (using Anguilla) all the way until my plugin was finished.

Coming to my plugin, what is this all about?

So I was working for a client, who has 300+ publications to manage in Tridion and it is always a pain to navigate to the different publications in a "230 x 275" GUI box, using mouse. You always need be alert to spot your publication while scrolling, because it does pass in a split second. This goes even worse when you operate on a remote system and there is some lagging involved.
Imagine about a customer having some 1000+ publications, now who wants to be Tridion content editor ? :)

So to address this issue, I developed an alchemy plugin named "Publication Panel Search". The plugin introduces a Search Box in the publication panel as shown below in the image. On typing in the search box, the publication panel gets updated and publications are filtered based on the search string. So no more scrolling to find a publication :)






To summarize it in technical terms:

  1. Extend the dashboard resource
  2. On dashboard load event, get the tree control by  var treeControl = $display.getView().getTreeControl();
  3. Add event handler function "AddSearchBox" on "Draw" event of the tree control. like: $evt.addEventHandler(treeControl, "draw", addSearchBox); where addSearchBox function is responsible to add the search box.

The plugin can be downloaded from Alchemy Web Store and after installing on CMS, it's ready to use. It requires Alchemy as a prerequisite on your CMS server.

If you want to have a look at the plugin code, I've put it on Github here at https://github.com/saurabhgangwar/Alchemy-PublicationPanelSearch .

Thanks