How to use the eRez CMS Integration Templates
These templates are useful when you want to have an image generated by eRez inserted on a page in a CMS system and possibly adjusted at a later time.
This is what is supposed to happen initially:
1) When the user wants to first insert an image from eRez into the CMS system, the CMS system opens a page on eRez using the template named “cms/go.html” and passing on the parameters listed above.
2) The eRez web interface is loaded in “CMS mode” and the user can locate an image and click on the thumbnail.
3) This will open a modified “Publish to Web” page with an “Insert in CMS” button.
4) When the user clicks the “Insert in CMS” button the result is posted back to a server side script in the CMS system (callback) with the fields described above. This server side script must then take care of the actual insertion of the image data on the page in question. In this example the data is simply posted back to this page and displayed above. The CMS system can use an ID assigned by the CMS system in order to track the image and make sure that it is inserted in the right place.
When an existing image is to be replaced or adjusted:
1) When the user wants to edit or replace an existing image already inserted from eRez into the CMS system, the CMS system opens the page on eRez again – but this time the “imgurl” is defined.
2) This will open the modified “Publish to Web” page directly with the existing image and settings.
3) The settings can now be adjusted or the user can select a different image as needed.
4) When the user clicks the “Insert in CMS” button the result is posted back to a server side script as before.
Please note:
1) The reason for posting data back to a server side script rather than just doing some simple JavaScript insertion is that it is not possible to invoke JavaScript functions on a page loaded from a different server. So unless the eRez and CMS systems happen to be running on the same server this is prohibited by the security constraints – for good reasons.
2) The CMS system can specify the required width and height so that eRez will automatically crop images to fit a template in the CMS system.
3) The settings can now be adjusted or the user can select a different image as needed.
4) When the user clicks the “Insert in CMS” button the result is posted back to a server side script as before.
Copyright 2001 - 2007 YaWah.com ApS. All rights reserved. Reproduction in whole or in part without written permission is prohibited.