Property "Prefix For Page Sources" <srcprefix>

Top  Previous  Next

The files (images, java scripts, etc) used in a page are referenced relatively since they all are located on the same web server.

Assume that page "index" on site "www.mysite.com" has an image file "sitepicture.gif" which is located in the "images" folder.

When "index" is compiled by the Application Studio, the reference to the image file is given as "/images/sitepicture". This is OK as long as "index" is viewed by the visitors from the "www.mysite.com".

HTML E-mails and Absolute Paths

Today, HTML E-mails are widely used since they can attract the users with their rich content consisting of with big size fonts, colors, images etc. A special attention should be given to references to the source files used by the page when preparing an E-mail page.

The references to the image files must be absolute because the relative references will not work if the E-mail page and the images will be locating on different servers.

For the above example, the reference to the image file should be "http://www.mysite.com/images/sitepicture.gif".

Set "Prefix For Page Sources" Property to build Absolute Paths

If you set a value to Prefix For Page Sources Property the Application Studio will automatically add it to in front of source properties that are relatively defined.

For example, if you set "http://www.mysite.com" to the property, source "images\sitepicture.gif" will be "http://www.mysite.com/images/sitepicture.gif" after the page is built.

You could ask "Why do I need this property? I can already do it by defining absolute references to source files.".

Because at the time you design your page the source files might not be located yet where they should be located. If you use absolute paths for the sources they will not be visible when you preview the page.

By defining relative references to source files and setting a url prefix with Prefix For Page Sources Property, you make sure that the sources are visible for Preview as well as Usage after build. Besides it will be easier to change locations of all the files with by just changing the one property.