Announcement

Collapse
No announcement yet.

Variable usage

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

    Variable usage

    Hi guys
    I am building a tabbed navigation menu with a changing sub-navigation, 2 horizontal bars on the page (http://www.gvdev.co.uk/dev/tcr/acatalog/index.html). On each top row tab the first number is "SectionNumber" (custom variable), second "SectionID" and then "SectionVal" (custom variable).

    When I click on a tab I want to pass the value of SectionNumber to SectionVal.

    Any ideas?

    My code goes -

    <div id="nav">
    <ul>
    <actinic:block type="TopLevelSectionList" >
    <li>
    <a href="<actinic:variable name="SectionPageName" />" target="_self">
    <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e" >
    <span class="active">
    </actinic:block>
    <actinic:variable name='SectionName'/> | <actinic:variable name="SectionNumber" /> | <actinic:variable name="SectionID" /> | <actinic:variable name="sectionval" />
    <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e">&lt;&lt;</span></actinic:block>
    </a>
    </li>
    <br />
    </actinic:block>
    </ul>
    </div>

    <div id="subnav">
    <ul>
    <actinic:block type="EntireSectionList" >
    <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%20and%20%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22sectionval%22%20%2f%3e" >
    <li><a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
    </actinic:block>
    </actinic:block>
    </ul>
    </div>

    #2
    Your example URL is borked, however i think using the "childsectionlist" within your entiresectionlist will give you want you want. You are then just having to show/hide the child list.

    Have a look on drillpine.biz at the menus already created, at £35 unless you are a martyr, it is often just quicker to use one where someone has already done the integration and has the support network in place. "accordion" menu could be bought installed and working all within 30 minutes quite easily.

    Comment


      #3
      I did notice the borkednes of it and it vexes me. It's fine this end, in Actinic and previewed locally but just try to upload. Anyway that's a different issue.

      About the menu, although martyrdom does have it's appeal, it's just one variables value that I need to move to another. How hard can it be?

      Comment


        #4
        Variables are read-only. You can't assign anything to them programatically.

        You could save the value of one into a PHP variable and pick it up again later in another bit of PHP
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X