Click or drag to resize
AlchemyUsing the HelloWorld NuGet Sample

The following steps use the HelloWorld Nuget package, which will add the necessary files to your project for a working Hello World plugin. This project can be used as a reference point or for you to extend. If extending, ensure that you change the Service name (in your API Controller), command names, and give your plugin a valid unique name of its own. You can also view the source of the HelloWorld plugin at HelloWorld Github Project.

Creating the Hello World Plugin

  1. Create a new Class Library project in Visual Studio. Note that the HelloWorld nuget package will install content files using your project's namespace.

  2. In the Package Manager console type the following:

    Install-Package Alchemy4Tridion.Sample.HelloWorld -Pre
    Note Note

    Only once Alchemy4Tridion has come out of public beta testing will version 1.0 be available without the "-Pre" flag.

    Alternatively, you can also right click your class library project and use the "Manage Nuget Packages" option to search and install the Alchemy4Tridion.Sample.HelloWorld package (make sure the prerelease filter option is selected).

  3. Build the solution. You will be prompted to upload the plugin to the store. At this stage, choose to cancel the upload. In the next step we will install the plugin manually.

  4. Go to the Alchemy page in your Content Management Explorer and click on the Plugins tab. This takes you to a screen which has a drop target that can accept your plugin. Assuming you built in debug mode, you should find a file with the "a4t" extension in the /bin/Debug folder of your solution. Locate this file and drag/drop it onto the target. You'll get a Message Center dialog letting you know whether the plugin was installed successfully or not.

    Caution note Caution

    Since this plugin has not been uploaded to the Webstore it is considered a development plugin. Be mindful of any other plugins that may already be installed; if your plugin doesn't have a unique name it will get an error saying it is already installed.

  5. Plugins require a page reload to show up in the Tridion GUI. After installing (or uninstalling) a plugin, a reload icon will appear in the top bar of the Alchemy UI, near where your username is displayed. You can either click this or use your browser's refresh button.

  6. Go to the Content Explorer view and notice the new Hello World button in the ribbon bar and the Hello World item in the context menu.

    Note Note

    Tridion GUI cache can be a tricky at timess. The Alchemy4Tridion framework will automatically recycle application pools as well as increment the System.config's modification attribute, however it has been noted that sometimes the cache just won't clear for particular files, and you may have to clear your browser's cache manually.

    If you don't see the desired results, you may have just experienced this issue.

  7. Pat yourself on the back. You just created an Alchemy4Tridion plugin!

Next Steps

If you chose to use the HelloWorld sample as the base of your project, make sure to keep note that when updating to a newer version via NuGet, the /Controllers/ServiceController.cs and AlchemyPlugin.cs file will be updated (you'll be prompted if you want your local file to be replaced).

You should also remove the HelloWorld nuget package (make sure to leave the Alchemy4Tridion.Plugins package) if you intend on using this as a real plugin so that other files don't get overwritten during updates.