Page 1 of 1

Bold formating certain sections

Posted: Tue Oct 31, 2006 2:09 pm
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?

Posted: Tue Oct 31, 2006 3:43 pm
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.

Posted: Wed Nov 01, 2006 8:28 pm
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

Posted: Thu Nov 02, 2006 12:16 am
by norman
Whoops. Sorry about the typo. I've corrected my post above in case it's of use to others.