DHTML Menu tutorial: how to set site root when publishing menu?

Setting site root is very important step in navigation menu creation, if setting site root wrongly, maybe you will meet problems below:

1.  Navigation menu works well locally, but it won’t be shown on internet;

2.  Navigation menu is inserted many pages saved in different directories, the menu maybe not show correctly on all web pages.


In order to avoid these problems, you need to set resource folder to save js and images to the defined folder, which makes sure the navigation menu can be shown on every page locally and Internet.     

What’s Site Root? Site Root is the root directory of your remote web server on your local driver.

How to set Site Root?



Very important: Make sure the folder structure is the same between your local computer and remote server.

If
your web site is http://www.sitename.com/subfolder/,
your web pages are stored to D:\foldername\sitename.com\subfolder on local computer

While
http://www.sitename.com/ is the root of your web site,
it corresponds to D:\foldername\sitename.com on your local computer.
So you should set D:\foldername\sitename.com as Site Root.

From the example above mention, we know that Site Root refers to the corresponding local folder to the root of your web site. Thus, no matter what your web site address is, you should first find the root of your site, which must be like this http://www.sitename.com, and then set its corresponding local folder as Site Root.

Generally, we will save js and image files to different folders:
If
You save js files to D:\foldername\sitename.com\js
and save image files to D:\foldername\sitename.com\images
So you should set \js and \images as Resource Folder.

The configuration like this:


 

How to set Web Path?



If the web address on your test local server is http:///www.testserver.com/subfolder, but the web address on your remote server is http://www.sitename.com, that is, your test local server and your remote server do not have the same directory to store your files, the Site Root can only work in one server, not both.

if,
your files are stored at D:\foldername\yourwebsite\subfolder on local computer,
for test server, Site Root corresponds to D:\foldername\yourwebsite locally,
while for remote server, Site Root corresponds to D:\foldername\yourwebsite\subfolder locally.

To solve the problem, you can set Web Path instead of Site Root, like
JavaScript Path: http://www.sitename.com/js/
Images Path: http://www.sitename.com/images/

The configuration like this:


 
Then be sure to upload all the resource files to the relevant folders on your remote server, and your menu could be previewed not only on the test local server, but also the remote server.
 

Home

Sothink is a trademark of SourceTec Software Co., LTD.
Flash is a trademark of Adobe.
Sothink Software: Flash to HTML5 Logo Maker

1234