Dashboard > RIFE > ... > Web engine > Automatic web application root URL substitution
RIFE Log In | Sign Up   View a printable version of the current page.
Automatic web application root URL substitution


Added by Geert Bevin, last edited by Geert Bevin on May 22, 2004
Labels: 
(None)

It's often a problem to develop web applications that are completely relocatable when reusing common template parts. You can now use the WEBAPP:ROOTURL template value ID which will be automatically substituted by the root URL of the web application. You typically use this in the base HTML tag and then write all the URLs in the templates as relative URLs according to the root directory of the web application, like this:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
    <base href="[!V 'WEBAPP:ROOTURL'/]" />
    <title>The title</title>
    <link rel="stylesheet" type="text/css" href="style/pub.css" />

</head>

<body><img src="images/rife-logo.png" width="251" height="105" border="0" alt="RIFE logo" /></body>
</html>

More information about the HTML base element can be found on the w3c site.



Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators