Announcement

Collapse
No announcement yet.

Creating a bulleted list containing top-level sections

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating a bulleted list containing top-level sections

    This code will create a simple bulleted list containing the top-level sections in your store.

    Paste the following code just above the </head> tag in your overall page layout:

    HTML Code:
    <actinic:variable name="JavaScriptArray" value="All Data From Top Level Sections" />
    
    <SCRIPT LANGUAGE = JavaScript>
    <!--
    function BulletList(pItem)
    {
    var strIDs = '<ul>';
    {
    for (var i = 1; i <= pItem.length; i++)
    {
    strIDs += '<li><a href=' + pItem[i].sURL + '>'+ pItem[i].sName + '</a></li>';
    }
    }
    strIDs += '</UL>'
    return strIDs
    }
    -->
    </SCRIPT>
    And then insert the following code in the main body of the page where you want the bulleted list to appear.

    HTML Code:
    <script language=Javascript1.2>
    document.write(BulletList(sections))
    </script>
    For more information about creating section lists with javascript see this article
Working...
X