Hi there
I've amended the subsection code from the AUG to display the current section links you can view this as work in progress at www.lapreya.com
I now want to only display the current parent section for example if you are in Makeup/Lips I only want to display the link to the current parent section ie Lips and not display the other parent sections which in this case would be eyes, face, nails, body, gifts.
I know its just a case of adding another if or else statment but the logic is doing my head in!
Any help would be greatly appreciated.
I've amended the subsection code from the AUG to display the current section links you can view this as work in progress at www.lapreya.com
I now want to only display the current parent section for example if you are in Makeup/Lips I only want to display the link to the current parent section ie Lips and not display the other parent sections which in this case would be eyes, face, nails, body, gifts.
I know its just a case of adding another if or else statment but the logic is doing my head in!
Any help would be greatly appreciated.
Code:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function SubSectionList(ar) { var SectionName = 'CUSTOMVAR:SECTIONNAME'; var SubSectionName = 'CUSTOMVAR:SUBSECTIONNAME'; { var strIDs = ' '; for (var i=1;i<=ar.length;i++) { if (ar[i].sURL !=null && ar[i].sName == SectionName) { strIDs += ' '; { if (ar[i].pChild) { for (var j=1;j<=ar[i].pChild.length;j++) { strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><p><span class="actxxsmall">' + ar[i].pChild[j].sName + '</span></a></p>'; { if (ar[i].pChild[j].sName == SubSectionName) { for (var k=1;k<=ar[i].pChild[j].pChild.length;k++) { strIDs += ' <a href="' + ar[i].pChild[j].pChild[k].sURL + '"><span class="actxxsmall">' + ar[i].pChild[j].pChild[k].sName + '</span></a><br>'; } } } } } } } } strIDs += ' ' return strIDs } } //--> </SCRIPT>
Comment