Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 

 

RENDER.ENCODE

This tag produces a complete URL (from the servlet name onward) from the arguments, previously packed arguments, and the servlet name (usually ContentServer or BlobServer) provided.

Syntax

Parameters

STR (required)
Input. Name of the servlet to use when rendering the URL, which is either ContentServer or BlobServer. Or you can include all the information for the URL to the left of the page name (which is supplied dynamically). For example:

OUTSTR (required)
Input. Name of the variable that stores the URL generated by this tag.

ADDSESSION (optional)
Input. Whether or not to include session IDs in the URL when a browser is set to reject cookies. true means to encode session IDs in the URL. false means not to. If this parameter is not specified, it is set to true by default.

ARGS_ (optional)
Input. Name/value pairs to pass to the tag, with the string ARGS_ as the prefix for the variable name. The names and values of these arguments are URL-encoded and incorporated into the final URL.

PACKEDARGS (optional)
Input. Previously created URL-encoded packed arguments, in standard form; that is, the output of a previous RENDER.PACKARGS tag.

Description

This tag creates a URL based on the arguments and packed arguments that are passed to it. All characters in the URL are URL-encoded.

Typically, you call the standard CS-Direct GetPageURL element to obtain URLs for hyperlinks on a page. That element is coded to preserve and resolve the various CS-Direct variables that are necessary for rendering pages in the CS-Direct environment. However, in special cases, you might need to use this tag to obtain a URL instead.

For example, if your site is static but you want to present a dynamic URL inside a static HTML file, use this tag. A URL created with this tag remains dynamic, even when passed through the Export to Disk publishing method. That is, Export to Disk does not translate a dynamic URL created by this tag into a static HTML file.

On a dynamic site, you can use this tag if your page or pagelet exists completely outside of the CS-Direct environment and you do not need to preserve any of the CS-Direct variables (c, cid, ct, p) other than rendermode when creating a URL for it.

This tag completes the appropriate URL encoding required for all the arguments passed to it--with the exception of arguments passed in as PACKEDARGS, which are assumed to be already URL-encoded. (The RENDER.PACKARGS tag URL-encodes arguments passed to it, which are the arguments you pass in to RENDER.ENCODE as PACKEDARGS.)

This tag also includes session IDs in the URL, according to the conventions of the local application server, if a browser is set to reject cookies.

errno

The possible values of errno include:

Value
Description
-1004
An argument is missing.

Example

This code uses RENDER.PACKARGS to URL-encode the name of the site as a string and then uses RENDER.ENCODE to create a URL that includes the previously encoded string:

See Also

RENDER.PACKARGS

  Home > Contents > Index >

FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.