No announcement yet.

How can I highlight the current section in the section list?

  • Filter
  • Time
  • Show
Clear All
new posts

    How can I highlight the current section in the section list?

    If you only have sections one-level deep (i.e. no sub-sections) then highlighting the current section within the top-level section list in the sidebar is simple.

    1. Change to the 'Design' tab.

    2. Click on the section link in the sidebar that you want to be highlighted.

    You will probably now be in a layout called something like 'Section Name Only Section Link'. You can check this within the title bar of the 'Layout Code' panel at the bottom left of the 'Design' tab.

    3. Insert some code into the layout to highlight the section link.

    4. 4.Click 'Apply'.

    Now every section link should appear highlighted.

    5. Now select the code you just inserted.

    6. Click the 'Insert Block' button

    7. Use the following code for the condition:

    HTML Code:
    <actinic:variable name="SectionName" /> == <actinic:variable name="MainSection::SectionName" />
    8. Click 'OK'.

    Now only the 'current' section should appear highlighted.

    This technique can be expanded for sub-sections i.e. keep the correct top level section highlighted even when you are in a sub-section.

    To do this, you need to create a new variable called 'SectionNumber'. This is done as follows:

    1. Go to 'Design | Library | Variables'.

    2. Expand the 'Section' group.

    3. Right-click on any variable and select 'New Variable'.

    4. Give the variable a name of 'SectionNumber' and a prompt of 'Section Number'.

    5. Set the 'Place of Setting' to 'Section'.

    6. Click 'OK' and close the library.

    7. Now assign a 'Section Number' to each of your top-level sections. You should then find that all the sub-sections inherit the value from the top level section as they are set to 'Use Parent'.

    8. Now insert highlighting code into the section link layout in the same way as described above, but this time for the condition use the following code:

    HTML Code:
    <actinic:variable name="SectionNumber" /> == <actinic:variable name="MainSection::SectionNumber" />
    That will keep the top level section highlighted, even when in a sub-section.