We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27305
    • 173 Posts
    My chunk for innerTpl, looks like this

    <ul[+wf.classes+]>[+wf.wrapper+]</ul>

    How can I get the <ul> to have a class like levelclass (like level1,level2), I know you can use &innerClass=`innerclass` in the call but it just adds innerclass I need a number.

    I tried adding [+wf.id+] to the ul but it does nothing.

    help
      I made my first site with modx
      ------------------------
      Shopping blog
      Sky+ HD
      • 6726
      • 7,075 Posts
      [+wf.id+] should work... that is if you set the &rowIdPrefix parameter :

      &rowIdPrefix
          default: FALSE
          values: name of prefix
          description: If this parameter is set, Wayfinder will replace the placeholder [+wf.id+] with a unique id consisting of the specified prefix plus the document id.
          example: &rowIdPrefix=`topMenu` will output the following for doc # 29: id="topMenu29"
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l&#39;outil id
        • 27305
        • 173 Posts
        I have set the &rowIdPrifix but it only works in the innerRowTpl with the <li></li> stuff

        I want it in the innerTpl that wraps around the innterRowTpl I put the [+wf.id+] but it just wont show anything.
          I made my first site with modx
          ------------------------
          Shopping blog
          Sky+ HD
          • 6726
          • 7,075 Posts
          My bad wf.id is not available in the context of InnerTpl, I checked one of my websites indeed I used [tt][+wf.docid+][/tt] instead.
          It will output the document’s ID.

          I used it this way :

          [tt]<ul class="item[+wf.docid+] [+wf.classnames+]">
          [+wf.wrapper+]
          </ul>[/tt]
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 7231
            • 4,205 Posts
            To set an incremental number to each level use levelClass.
            &levelClass
                default: NULL
                values: name of class
                description: The levelClass will be applied to each item denoting each items level, the level number will be added to the specified class (i.e. level1, level2, level3, etc...)
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 16183
              • 1,390 Posts
              Quote from: davidm at Sep 02, 2008, 07:11 AM

              My bad wf.id is not available in the context of InnerTpl, I checked one of my websites indeed I used [tt][+wf.docid+][/tt] instead.
              It will output the document’s ID.

              I used it this way :

              [tt]<ul class="item[+wf.docid+] [+wf.classnames+]">
              [+wf.wrapper+]
              </ul>[/tt]

              @David, am curios how you used the +wf.docid+ since according to the wayfinder wiki and muddydogpaws.com, +wf.docid+ is NOT one of the placeholders available for both innertpl and outertpl. Am I missing something? undecided


              &outerTpl
                  default: see example
                  values: name of template chunk
                  description: .....................
                  available placeholders:
                  [+wf.classes+] - where classes specifed will be inserted (includes class=" ")
                  [+wf.classnames+] - outputs the just the class names (without class=" ")
                  [+wf.wrapper+] - where inner content will be inserted


              &innerTpl
                  default: NULL
                  values: name of template chunk
                  description: ........
                  available placeholders: Same as OuterTpl

                • 6726
                • 7,075 Posts
                Oops sorry I misread I used it in InnerRowTpl and forgot to remove the wf.docid bit from my InnerTpl chunk embarrassed
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                  • 27305
                  • 173 Posts
                  I can confirm that it didnt work on innerTpl, &levelClass won’t work on the innerTpl
                    I made my first site with modx
                    ------------------------
                    Shopping blog
                    Sky+ HD
                    • 27305
                    • 173 Posts
                    So its not possible then?
                      I made my first site with modx
                      ------------------------
                      Shopping blog
                      Sky+ HD
                      • 7231
                      • 4,205 Posts
                      You can use the &parentRowTpl to build the submenu rather than &innerTpl

                      In the parentRowTpl include the <ul> tags:
                      <li[+wf.classes+]>
                      	<a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]"</a>
                      	<ul id="level[+wf.docid+]">
                                    [+wf.wrapper+]
                              </ul>
                      </li>


                      Then in the innerTpl simply add:
                      [+wf.wrapper+]
                        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                        Something is happening here, but you don&#39;t know what it is.
                        Do you, Mr. Jones? - [bob dylan]