Hi Veronica
Thanks for that. I'll have a read up of it and try to understand it. I've already got a file with all the relative file paths for my sections and subsections. How would I incorporate that into slashdot menu? That's where I'm getting confused. I tried a number of different things today but nothing worked
What I've got is a js file with builds links for my section/subsection as I add them to my site:
Code:
var section_tree = new CreateArray(7);
section_tree[1].sName = "Books";
section_tree[1].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[1].sImage = "";
section_tree[1].nSectionId = "1";
section_tree[1].nImageWidth = "13";
section_tree[1].nImageHeight = "13";
section_tree[2].sName = "Clothing";
section_tree[2].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[2].sImage = "";
section_tree[2].nSectionId = "2";
section_tree[2].nImageWidth = "13";
section_tree[2].nImageHeight = "13";
section_tree[2].pChild= new CreateArray(1);
section_tree[2].pChild[1].sName = "Shoes";
section_tree[2].pChild[1].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[2].pChild[1].sImage = "";
section_tree[2].pChild[1].nSectionId = "3";
section_tree[2].pChild[1].nImageWidth = "13";
section_tree[2].pChild[1].nImageHeight = "13";
section_tree[3].sName = "Homeware";
section_tree[3].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[3].sImage = "";
section_tree[3].nSectionId = "4";
section_tree[3].nImageWidth = "13";
section_tree[3].nImageHeight = "13";
section_tree[4].sName = "Computers";
section_tree[4].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[4].sImage = "";
section_tree[4].nSectionId = "5";
section_tree[4].nImageWidth = "13";
section_tree[4].nImageHeight = "13";
section_tree[5].sName = "Stationery";
section_tree[5].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[5].sImage = "";
section_tree[5].nSectionId = "6";
section_tree[5].nImageWidth = "13";
section_tree[5].nImageHeight = "13";
section_tree[6].sName = "Best Sellers";
section_tree[6].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[6].sImage = "";
section_tree[6].nSectionId = "7";
section_tree[6].nImageWidth = "13";
section_tree[6].nImageHeight = "13";
section_tree[7].sName = "New Products";
section_tree[7].sURL = "../../../Act_PreviewWarningPage.html?ACTION=SHOWCART";
section_tree[7].sImage = "";
section_tree[7].nSectionId = "8";
section_tree[7].nImageWidth = "13";
section_tree[7].nImageHeight = "13";
And then this bit of js code that grabs the section/subsesction headings from the above js file:
Code:
<script language="javascript" type="text/javascript">
function YahooSections(ar)
{
var strIDs = '';
for (var i=1;i<=ar.length;i++)
{
if (ar[i].sURL != null)
{
strIDs += '<a href="' + ar[i].sURL + '"><span class="sdmenu"><b>' + ar[i].sName + '</b></span></a><br />';
{
if (ar[i].pChild)
{
for (var j=1;j<=ar[i].pChild.length;j++)
{
if (ar[i].pChild[j].sURL != null)
{
strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="sdmenu">' + ar[i].pChild[j].sName + '</span></a><br />';
}
}
}
}
strIDs += '<br />'
}
}
return strIDs
}
//
</script>
And this bit which displays it on the sidebar:
Code:
<script language="javascript" type="text/javascript">
document.write(YahooSections(section_tree))
What I don't understand is HOW I can integrate this into SDMENU. Any suggestions would be appreciated.
Sorry for all the code - I'm hoping you'll be able to say chane x, y, z and wallop!!!
Thanks once again for all your help
Sam
Bookmarks