JSCookMenu and Search Engine Bot

 

stats counter

Introduction

One complaint which I hear a lot from JSCookMenu users is that the JavaScript menus are not search bot friendly. Since version 1.4, JSCookMenu comes with a new menu drawing function cmDrawFromText which takes an HTML node and turn it into a dynamic menu. Version 2.0 further improves this feature.

Regular Menu

Here is an html section which can be understood by search bots:

Note that <span> tag after <li> serves as individual icon part of menu. Description is the title attribute of <a> tag. For a non-link item, you can use <span> or <div> instead of <a>. <li></li> is a menu split. The rest should be fairly obvious. Then call

	cmDrawFromText ('testHtmlMenu', 'hbl', cmThemePanel, 'ThemePanel');

which would generate the desired menu. I am not sure if this ability allows the mixing of pure CSS based menus with JSCookMenu, but you can certainly try it out :)

Custom Action

There was a request of making custom actions using this approach. So here is a way in JSCookMenu 2.0:

  • File
    • Open
    • Save
  • Palette
    • Options
    •                
                     

Now to create an custom action, the first <span> or <div> tag after <li> should specify its class being either "cmNoAction" or "cmNoClick", corresponding to _cmNoAction and _cmNoClick. The HTML inside the <span> or <div> tag contains the custom action. Since a custom action starts with a <td> tag. One needs to wrap the whole thing inside a table first. HTML inside the first <tr> is considered as the custom action code.

  • File
    • Open
    • Save
  • Palette
    • Options
    •                
                     

 

 

 

 

 

 

 

 

heng' html

 

 

 

Support This Project

 

SourceForge.net Logo

(c) Copyright 2002-2007 Heng Yuan. All rights reserved.

Valid XHTML 1.0! Valid CSS!