URL Context [URL]Any Text[/URL]
Changes text to URL-compatible characters.

To automatically convert text containing spaces or other "illegal" URL characters, place it inside a [URL] context. Certain letters, such as spaces, colons, and the equals sign (=) are not allowed inside URLs unless they are first converted to hexadecimal form.

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

<img src="[URL]Filename with spaces.gif[/URL]">

In the example above, the displayed text will be

<img src="Filename%20with%20spaces.gif">

This context is most often used with [sku] fields representing the name of a picture of a product, as in <img src="[sku].gif">, because many times a product sku will have "illegal" characters in it.

[URL] is also often used to create predefined hyperlink-style searches, as in <a href="xx.tpl?command=search&db=xxx.db&eqNAMEdata=Grant%20Hulbert">. Sometimes you will want to create this kind of HTML dynamically using text from a field in a database:

[foundItems]
<a href="xxx.tpl?command=search&db=xx.db&eqNAMEdata=[URL][Name][/URL]">
[/foundItems]

User Contributed Notes
URLContext  

Copyright © 2008 WebDNA Software Corporation, Inc.