Hello Everyone,

I just got this reply from Xara support this morning. I guess I'm one of those that they sent this to.

Hope they dont mind me posting the reply here. The work around for the problem is to use absolute paths (pointing to the scripts) rather than relative path.

Here it is:

This really depends on your own abilities as to whether it can be achieved.

When you create a template and insert a navbar within it, it causes various script elements to be inserted in the template page which reference the location of the JavaScript files used to create and display the navbar. The script elements contain relative links to the location of the JavaScript files

For example,

<script webstyle3>document.write('<scr'+'ipt src="xaramenu.js">'+'</scr'+'ipt>');document.write('<scr'+'ipt src="template.js">'+'</scr'+'ipt>');/*img src="template.gif" moduleid="webstyle (Project)\template_off.xws"*/</script>


Following this, you select to create some web pages which you would probably store in a separate folder in comparison to the template file.

Having created a page you select to apply a template to the page This causes the script elements to be applied to your web page. Assume your web page is named index.htm Applying the template will cause the script elements to be applied to the page as

<script webstyle4>document.write('<scr'+'ipt src="xaramenu.js">'+'</scr'+'ipt>');document.write('<scr'+'ipt src="template.js">'+'</scr'+'ipt>');/*img src="template.gif" moduleid="webstyle (Project)\template_off.xws"*/</script>

Now you select to view your web page index.htm in a web browser. The web browser reads the source code of the web page and attempts to retrieve the file xaramenu.js and template.js from the same folder as where the web page resides as this is what the source code tells it to do.

However the navbar will not display. This is because the files xaramenu.js and template.js are not in the same folder as the web page.

To work around this problem, you need to know the published url of where the template file and the other files in the template folder will be published to.

This will probably be http://www.yourdomainname.com/Templates

Once you know this information and have uploaded the Template and files within the folder to this location, select to edit the html which makes up your template. Find the code which references the navbars as below

<script webstyle3>document.write('<scr'+'ipt src="xaramenu.js">'+'</scr'+'ipt>');document.write('<scr'+'ipt src="template.js">'+'</scr'+'ipt>');/*img src="template.gif" moduleid="webstyle (Project)\template_off.xws"*/</script>

And ammend this to contain the full url of where the files mentioned are located. So the above would become

<script webstyle3>document.write('<scr'+'ipt src="http://yourdomainname.com/Templates/xaramenu.js">'+'</scr'+'ipt>');document.write('<scr'+'ipt src="http://yourdomainname.com/Templates/template.js">'+'</scr'+'ipt>');/*img src="template.gif" moduleid="webstyle (Project)\template_off.xws"*/</script>

Then apply the template to your web pages stored in separate folders and the menu would be displayed in the web pages when viewed in a web browser.

The menu will not be displayed within the editing mode of Dreamweaver. To resolve this problem, lets look again at the code.

<script webstyle3>document.write('<scr'+'ipt src="http://yourdomainname.com/Templates/xaramenu.js">'+'</scr'+'ipt>');document.write('<scr'+'ipt src="http://yourdomainname.com/Templates/template.js">'+'</scr'+'ipt>');/*img src="template.gif" moduleid="webstyle (Project)\template_off.xws"*/</script>

In the above example, you see the code img src="template.gif This is being used by Dreamweaver to cause the image of the navbar to be displayed in the normal mode of Dreamweaver.

We need to change the relative path to the image template.gif to be a full path. Therefore the above snippet would become

<script webstyle3>document.write('<scr'+'ipt src="http://yourdomainname.com/Templates/xaramenu.js">'+'</scr'+'ipt>');document.write('<scr'+'ipt src="http://yourdomainname.com/Templates/template.js">'+'</scr'+'ipt>');/*img src="file:///c:/template/template.gif" moduleid="webstyle (Project)\template_off.xws"*/</script>

Alternatively Navigate to the folder on your local computer where this gif file resides. Copy the file and paste it into the folder in which your web pages reside. This will allow the graphic to be displayed within your web pages in the Dreamweaver editor.

Thank you, trust this helps
CS