Announcement

Collapse
No announcement yet.

Sections on home page

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

    Sections on home page

    Hi there,

    I'm building a site which requires the top level sections of the store to be displayed on the home page, which is a brochure page in Actinic. I have tried putting NETQUOTEVAR:PARENTSECTIONSTOP into fragments and onto the Act_brochureprimary.html but it doesn't work in these environments.

    I have also tried, with a little success, a variant of the " List of Section Images With JavaScript" from page 41 in the AUG.

    <SCRIPT LANGUAGE = JavaScript>
    <!--
    function ImageList(pItem)
    {
    var strIDs = '';
    {
    for (var i = 1; i <= pItem.length; i++)
    {
    strIDs += '<TABLE width="102" BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD height="30" ALIGN="center" background="acatalog/cg_section_top.gif"><a href=' + pItem[i].sURL + '><span class="actxxsmall"><font color="#000000">'+ pItem[i].sName + '</font></span></a></TD></TR><TR><TD height="72" ALIGN="center" VALIGN="top"><a href=' + pItem[i].sURL + '><img src="acatalog/' + pItem[i].sImage + '"alt="'+ pItem[i].sName + '" width=' + pItem[i].nImageWidth + ' height=' + pItem[i].nImageHeight + ' border=0></a></TD></TR></TABLE>';
    }
    }
    return strIDs
    }
    -->
    </SCRIPT>
    The trouble with this is the tables appear under each other and not across the page in 2 rows as I'd hoped and as appears in the acatalog/index.html file.

    I could use fragments but these aren't self generating and as the sections may change this really should be automated.

    Can anyone give me any clues or other avenues to try?

    Thanks in advance Garry

    #2
    A step on from above, I've found one can use NETQUOTEVAR:TOPLEVELSECTIONSTOP in the act_brochureprimary.html file but this just generates a list of the sections, so I'm wondering if this can be amended.

    Garry

    Comment


      #3
      Your JavaScript need amending to move the <table><tr> (and the final </tr></table> outside of the loop. Just generate <td> .... </td> inside the loop.

      You'll also need a test for your maximum # across (if you want more than 1 row) and bung in a </tr><tr> to start a new row every time the max # across is reached.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman,

        once more you come to the rescue. I was kind of working round to what you said, but then realised one can access the top level sections anywhere via NETQUOTEVAR:TOPLEVELSECTIONSTOP, editing the file found via "template manager | Section | Top section" and altering things in "Design | Design Options | Sections | Location and arrangement of top level section list". It is a little bit limiting in its placement but works for me.

        Garry

        Comment

        Working...
        X