Categories

TeamSite Toolbar available for download

teamsite-toolbar-cbb

I have prepared the TeamSite toolbar described in my earlier post for download and use by others.   Instructions may be found below.

Note: use at your own risk with no warranty or support.  However I am happy to take questions or comments if you have any.  It works nicely on a Linux installation of TeamSite, version 6.7.2, and will probably work on others. It’s untested!

1 Put these two files in $IWHOME/httpd/iw

DOWNLOAD: greasemonkey-include.js

DOWNLOAD: greasemonkey-include-iwlogo.gif

You will need to edit the first file.  Find the section marked “Map Environments to TeamSite Servers” to tell the script which TeamSite server to use for each of your sites.

You will also need to set the permissions and ownership of the files to the same as the other files in this location.

2 Put these two files in $IWHOME/httpd/iw-bin

DOWNLOAD: greasemonkey-checklogin.cgi

DOWNLOAD: greasemonkey-checkdcr.cgi

You will need to edit the first line of each of these, to point to your iw-perl path.  You will also need to set the permissions and ownership of these files.

3 Install the GreaseMonkey add-on for Firefox

https://addons.mozilla.org/en-US/firefox/addon/748

4 Configure GreaseMonkey

  1. Click “New User Script…”
  2. Enter a name, e.g. “TeamSite Toolbar”
  3. Enter a namespace, e.g. “teamsitetuesday.co.uk”
  4. In the “Includes” section, add an expression which matches your sites, e.g. http://*.mycompany.com/*
  5. When prompted, browse to your favourite text editor.
  6. When the text editor opens, paste the following script.  Amend the URL so that it picks up the JavaScript you imported in the very first step.
var s = document.createElement('script');
s.setAttribute("src", "http://teamsite-prod.mycompany.com/iw/greasemonkey-include.js");
s.setAttribute("type", "text/javascript");
document.body.appendChild(s);

5 Add metadata into your pages

This new version of the toolbar works by looking for metadata in the HTML served from your site.

5.1 Add “cms.path” metadata

This tells the script which path to use for the DCR when the user clicks “Edit”:

<meta name="cms.path" content="/default/main/branch1/WORKAREA/workarea-name/templatedata/category/type/data/folder/dcr-name"/>

If your site is a static HTML site, this is simply achieved by modifying your TPL to include this metadata in the page header.  To get the path, the function you need to use is iwpt_get_dcr_name(), and you’ll need to strip off the /iwmnt part.

If your site is a dynamic site, you will need to insert the DCR path into the database upon deployment, and amend the application to include this metadata in the page header.

5.2 Optionally, add “cms.newform” metadata

This tells the script which DCR to create when the user clicks “New”

<meta name="cms.newform" content="/default/main/branch1/WORKAREA/workarea-name/templatedata/category/anothertype"/>

If everything is set up ok, you should see the toolbar when you now browse to your site.

Drop me an email if it works for you, or if you’ve got any comments.

Known Issues

I’ve spotted a bug when Firebug is installed, which prevents the toolbar from opening.  Disable Firebug and this problem disappears.

Design Notes

This toolbar originally did not require any metadata to be included into the HTML. It just worked by editing the corresponding HTML file in TeamSite using a mapping mechnism.  I found this to be cumbersome, and it lacked flexibility.  The metadata technique method works on ANY site, whether “flat”, “dynamic” or some combination of the two.

2 comments to TeamSite Toolbar available for download

  • Alun

    Look nice Loz – gives a nice solution to a common problem; teamsite navigation. How widely is it being used? Have you had some good user feedback?

  • loz

    Thanks Alun. It’s not in production use yet, but it’ll be introduced with the project we’re currently working on. I’ve given demos to some key users, and the response has been a resounding “Ooooh!”… a noise seldom heard by TeamSite developers ;)

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>