Bold formating certain sections

Another automatic cascading menu for Actinic 5 onwards. This one allows more modern DHTML effects.
Post Reply
Sean Delere
Posts: 4
Joined: Tue Oct 31, 2006 2:02 pm

Bold formating certain sections

Post by Sean Delere »

Is it possible to have only some of the sections formatted bold within Norcascade?

I have set some 'dummy' sections within Actinic to act as titles and would like to make them stand out.

Alternativly is there a better way of doing this?
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Try replacing this code in norcascade_pop_tail.js (in your Site folder). back it up first.

Code: Select all

    if ( names[I].pChild  && (thislevel <= maxdepth) )
      {
      haschild = true;
      var thisseq = 'mM' + seq++;
      names[I].pChild.id = thisseq;
      if ( OnlyFinalLinks )
        {
        addItem(names[I].sName, thisseq, 'sm:', null, LineHeight, Spacing);
        }
      else
        {
        addItem(names[I].sName, thisseq, 'sm:', null, LineHeight, Spacing).onclick='window.location.href="' + link + '"';
        }
      }
    else
      {
      addItem(names[I].sName, link, '', null, LineHeight, Spacing);
      }
with

Code: Select all

    var sectionname = names[I].sName;
    // add lines as required below
    if (sectionname.indexOf('My Section') > -1 ) sectionname = '<b>' + sectionname + '</b>';
    if (sectionname.indexOf('My Other Section') > -1 ) sectionname = '<b>' + sectionname + '</b>';
    if (sectionname.indexOf('My Final Section') > -1 ) sectionname = '<b>' + sectionname + '</b>';

    if ( names[I].pChild  && (thislevel <= maxdepth) )
      {
      haschild = true;
      var thisseq = 'mM' + seq++;
      names[I].pChild.id = thisseq;
      if ( OnlyFinalLinks )
        {
        addItem(sectionname, thisseq, 'sm:', null, LineHeight, Spacing);
        }
      else
        {
        addItem(sectionname, thisseq, 'sm:', null, LineHeight, Spacing).onclick='window.location.href="' + link + '"';
        }
      }
    else
      {
      addItem(sectionname, link, '', null, LineHeight, Spacing);
      }
And alter the 3 sample lines as required.
Last edited by norman on Thu Nov 02, 2006 12:14 am, edited 1 time in total.
Norman
Sean Delere
Posts: 4
Joined: Tue Oct 31, 2006 2:02 pm

Post by Sean Delere »

Works a treat thank you Norman once I spotted the missing N in the second sectionname

if (sectionname.indexOf('My Section') > -1 ) sectioname = '<b>' + sectionname + '</b>';

Sean
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Whoops. Sorry about the typo. I've corrected my post above in case it's of use to others.
Norman
Post Reply