Announcement

Collapse
No announcement yet.

custom child section style

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

    custom child section style

    Hi, ive already posted this but with no answer, but ive thought of another way to do it but i need some help.

    I am using javascript to generate a list of parent and child sections on my pages, but i want some icons to show on certain child sections, ive done this before with TOPLEVELSECTIONSTOP...but as i need it on child sections thats out.

    my thought was using the javascript to manually specify an ID for certain child sections. Im not a javascript expert but surely there must be a way of attaching an ID to a certain parents child href tag so for example:

    ar[1].sName.pChild[5].element1.id='buy';

    i know thats not right but you get the idea

    #2
    Basically i need something like this.

    ar[1].pChild[1].parentTag.id = "buy";

    where i can specify exactly which section and sub section i want to add the id to.

    I know this sort of works if i do

    ar[1].pChild[1].sName = "buy";

    that changes my section name but i know sName is a variable used in the section tree so i dont know whether i can use the parentTag or parentNode feautre.

    Comment


      #3
      You can only use what Actinic puts into Act_section_tree.js and those are fixed number of fields. Look at an Act_section_tree.js in Notepad and see what's there. You could perhaps have code like

      image = 'default.jpg';
      if (ar[1].pChild[1].sName.indexOf('xyz') > -1) image = 'xyzimage.jpg';
      if (ar[1].pChild[1].sName.indexOf('pqr') > -1) image = 'pqrimage.jpg';

      so if the Section name contains certain text (e.g. xyz or pqr, you override the image.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Hi norman, thx for the reply.

        what would the variable image relate to do you mean the sImage.....would this be a section tree variable or something defined by me.

        The problem is i have a class already applied to the href around the parent and child, so i need to use the id tag to apply a further style.

        heres the website is question, its the menu down the left........hopefully you can get a better idea from that....if there is an alternative that could also be considered.

        if there is a template that controls subsections that would also work...similar to the parent section template used by the NVQ TOPLEVELSECTIONSTOP.

        cheers

        Comment

        Working...
        X