SSAB Merox AB
Paddex
61380 Oxelösund

Logga in

Om cookies

Webmasterns hörna

Hjälp: Collateral Macros

The collateral management system has several macros for its specific purpose.

^File();
This macro builds a quick file link. It creates an icon for the file and outputs the files name. Then it links them both to the file for downloading.

^I();
This macro retrieves an image from the collateral management system along with an HTML image tag so that you can quickly display an image from the repository in your content.

Example: ^I("logo");

^i();
This macro retrieves the URL for any file in the collateral management system.

Example: ^i("status report");

^RandomImage();
This macro takes a collateral folder as a parameter. If the folder name is omitted, then the root folder will be used. The macro then randomly chooses an image in the folder and returns it in much the same way the ^I(); macro works.

Example: ^RandomImage("site headers");

^RandomSnippet();
This macro takes a collateral folder as a parameter. If the folder name is omitted, then the root folder will be used. The macro then randomly chooses a snippet from the folder and returns it in much the same way the ^Snippet(); macro works.

Example: ^RandomSnippet("quips");

^SI();
The Scaled Image macro allows images to be found in the collateral and scaled (on the server-side), either maintaining the original aspect ratio or an entirely new ratio of your design.

It takes four parameters. The first is the image name or optionally the collateral id. The second is the width. Set the width to "0" to maintain aspect ratio by height. The third is height. Set the height to "0" to maintain aspect ratio by width. The fourth parameter allows you to specify additional parameters to the image.

Examples:
Retrieving an image by name (no scaling)
^SI(myimage);

Retrieving an image by collateralId (no scaling)
^SI(66);

Scaling by width, maintaining aspect ratio
^SI(66,25);

Scaling by height, maintaining aspect ratio
^SI(66,0,25);

Playing with the aspect ratio
^SI(66,148,25);

Using parameters
^SI(66,0,0,'border="0"');

^Snippet();
This macro retrieves the contents of a snippet in the collateral management system and inserts it into the page.

Example: ^Snippet("flash code");

^Thumbnail();
This macro retrieves the URL for the thumbnail of any image in the collateral management system.

Example: ^Thumbnail("logo");

^ThumbnailLinker();
This macro builds a quick image viewer using nothing more than the collateral management system. It creates a thumbnail image with the name of the image under it and then links them both to the full sized image. You can also specify a "1" as a second parameter to have the linker create a new window to display the linked image.

Example: ^ThumbnailLinker("logo");

Se vidare:

Ändrad: 2 december 2008

Hyttsten