Knowledge Base support case for AllWebMenus, abstracted and stripped of all user’s private info.


Initial Email From:
Dave
Initial Email Subject: Using the menu in an SSI script
Support Case Month: September 2012

I'd like to use the menu in an SSI script so I just have to have it in one spot on the website.  Normally I would do this by creating a directory off the root called "includes" and placing all the scripts for the headers and footers and other frames that don't change. 
However I can't find any way to do that when I build the actual script from your product.  Is there a setting to do that or is there something I can edit to point to that?

Reply From: Likno Customer Support

Dear Dave,

In the case of AllWebMenus you should not insert the full compiled code as this will change with every menu update. Moreover this only exists in one place anyway!

Instead you can insert the Linking Code in your SSI so that you do not have to insert it into every page.

If you choose to do this, please make sure that the "src" path is root relative (e.g. starts with "/")  or full path (e.g. "http://...") in order to avoid problems with pages that exist in subfolders.

Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter

Reply From: Dave

Hi Kostas,

Thanks for the answer but could you tell me specifically how to do that.  I know that's how it should be done but I can't seem to get it to work.  Would you please provide examples of what should go in what directory, assuming the the root contains the awmdata directory and the ssi scripts reside in an includes directory off the root?

Thanks,

Dave

Reply From: Likno Customer Support

Dear Dave,

Since your "awmdata" folder resides in the root folder, I assume that the same is true for the "menu.js" (compiled menu file). In this case, the "src" part of the Linking Code should be:

src="/menu.js"

What you need to do is to Compile your menu and then in the Link dialog you need to select the second tab for "manual" Linking:

manual linking code

Copy this Linking Code and paste it into your SSI file. Then change the src to start with slash ("/menu.js"). That should be all!

Include your SSI file in your pages and the menu will appear.

Note: if you use a positioning “Relative to Element” then you need to make sure that this element exists in all your pages.

If something does not work and you are not sure, send me a URL of an online page to see what you have done so far.

Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter

Reply From: Dave

Hi Kostas,
I tried doing what you suggested, but it's possible I didn't give you enough info.
I'm building the site off of the root directory of another site just for testing purposes because I'm using your menu program for 2 new versions of websites that are currently active.  The URL where the awmdata directory, the caballeros.js and the index.shtml exist is http://www.whitegrizzleyart.com/caballeros/
so, obviously you'd call the new Caballeros website with
http://www.whitegrizzleyart.com/caballeros/index.shtml.

I edited the file (caballeros.js) as you suggested and that didn't seem to work, so the current file looks like this because I though maybe making it an absolute path would work. (it doesn't).

<!-- ******** BEGIN ALLWEBMENUS CODE FOR caballeros ******** -->
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="caballeros",awmBN="896";</script><script charset="UTF-8" src=
"http://www.whitegrizzleyart.com/caballeros/caballeros.js" type="text/javascript"></script><script type="text/javascript">awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR caballeros ******** -->

I then placed the above code into a file called menu.ssi put it in the includes directory http://www.whitegrizzleyart.com/caballeros/includes.
I'm calling the menu with

<body  style="color: white; background-color: black; background-image: url(piano-key-background.gif);"
alink="#ff6600" link="#33ccff" vlink="#3333ff">
<!--#include virtual="http://www.whitegrizzleyart.com/caballeros/includes/menu.ssi" -->

However if you go to the website http://www.whitegrizzleyart.com/caballeros/ you get an error message saying "[an error occurred while processing this directive]".  If you look at the page source it says:

<body style="color: white; background-color: black; 
background-image: url(piano-key-background.gif);" alink="#ff6600"
link="#33ccff" vlink="#3333ff">
[an error occurred while processing this directive]<br>
So, obviously I'm doing something wrong I guess.  Any ideas?
Thanks,
Dave

Reply From: Likno Customer Support

Dear Dave,

I saw the error. What you did for the Linking Code is 100% correct.

The problem is most likely with the way you include “menu.ssi” as the error you see is also a server-side error.

If the include worked then you would see the Linking Code in your index page. You can also test this by temporarily removing the Linking Code from “menu.ssi” and adding a simple text (e.g. “test”).

I am not 100% sure about this, but I believe that the includes should use a path as the server see it – not as the browser see it. This means you should have something similar to this:

<!--#include virtual="/usr/home/public/caballeros/includes/menu.ssi" -->

(obviously the path will be different, but I hope you get the point)

Regards,

Kostas

Likno Customer Support

www.likno.com

Powerful javascript menus (CSS menus/drop-down menus/sliding menus), web trees, buttons, tabs, modals, tooltips, accordions, scrollers, designs for your websites!