Asset Chooser Plug-in for Sitecore

Follow

The Asset Chooser plugin for Sitecore integrates your existing Webdam account with Sitecore, giving users with view and download permissions the ability to insert Webdam-housed images and videos into any post. 

This plugin is available for all Webdam customers.

Here's how you set it up:

Copy and configure Webdam plugin:

  1. Download and unzip webdam_sitecore.zip.

  2. Copy webdam dir to webserver docroot.

  3. Configure Webdam plugin. Edit "webdam/wd-assetchooser.js" and configure the DOMAIN and RETURN_PATH.
              Webdam.embedAssetChooser = {
              DOMAIN: 'http://localhost',
              RETURN_PATH: 'http://localhost/webdam/lib/wd-setvariable.html',
              WIDGET_WIDTH: 946,
              WIDGET_HEIGHT: 594,
              ..
              };
 
NOTE:
  • DOMAIN is your Webdam account. Example: company.webdamdb.com

  • RETURN_PATH sets the endpoint to "wd-setvariable.html" located on your web server and is responsible for passing asset information between the Webdam Asset Chooser (hosted at Webdam) to your web server.

Add Webdam button to Rich Text Editor in Sitecore:

  1. In the core database, add an item in of type "/sitecore/templates/System/Html Editor Profiles/Html Editor Button" below "/sitecore/system/Settings/Html Editor Profiles/Rich Text Full/Toolbar 1".

  2. Assign "webdam-icon.gif" icon to item (located in DocRoot/webdam).

  3. In the "Click" field, set id to "Webdam" for your action.

  4. Copy and add all content from "webdam/wd-assetchooser.js" (located in DocRoot/webdam) to end of RichText Command js file: "\sitecore\shell\Controls\Rich Text Editor\RichText Commands.js"

Prepare Cross-Domain communication for Module:

  1. Add the following directives into Apache conf. Install mod_headers.c if not installed already.

              <IfModule mod_headers.c>
              # Allowing remote sources to access resources
              # The origin can be filtered OR use * to allow for all
              SetEnvIfNoCase Origin "http?://(.*\.)?(webdamdb\.com)(:\d+)?$" ACAO=$0
              Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
              </IfModule>

 

The following asset types are not embeddable through the plugin: .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf, .indd., .swf, .ogg, .qxd, .qxp, .svg, .svgz, .otf, .sit, .sitx, .rar, .txt, .zip, .html, .htm.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Request Support
Existing Request