We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37713
    • 17 Posts
    Hi, is there any way to add a different row (in my case its h1 with logo) in the middle of my menu.... the design i m working on has the logo like this, and i m little lost. I was thinking about writing two wayfinder calls using list of resource ids. If there is some other "more elegant" solution, would love to know.

    Thanks
      • 22427
      • 793 Posts
      You could use the parameter &rowIdPrefix to specify a unique ID for each row. Then you write a chunk for the &rowTpl parameter wherein you can let modifiers decide about the output of the extra h1 element, dependent on the value of the row's ID.
        • 37713
        • 17 Posts
        Hi, thanks for answer, well i tried to do it with modifiers, but i couldnt find out how. Tried to find some tutorials on modifiers, but only found the description in modx manual. Can you please help me to get it work.... I guess i m messing it up, I tried

        [[+wf.id :if=`[[+wf.id]]` :eq=`id-of-li-after-which-i-want-li-with-h1` :then=`<li><h1>Text</h1></li>` :else=`<li [[+wf.classes]] [[+wf.id]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]><span>[[+wf.linktext]]</span></a>[[+wf.wrapper]]</li>`]] 


        I guess its completely wrong, and i tried some modifications, but without any succes.
        Thanks in advance.
          • 22427
          • 793 Posts
          Try this chunk for your &rowTpl:
          [[+wf.id:eq=`id-of-li-*before*-which-i-want-li-with-h1`:then=`<li><h1>Text</h1></li>`]]
          <li [[+wf.classes]] [[+wf.id]]>
          <a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]><span>[[+wf.linktext]]</span></a>[[+wf.wrapper]]</li>
            • 37713
            • 17 Posts
            Thanks again, well i tried exactly what you posted, but nothing happend, the list is displayed normaly, but no sign of h1 in generated code. I m quite lost smiley
              • 22427
              • 793 Posts
              Sorry, I was misleading you.

              If you take &rowIdPrefix=`item-` the value of the placeholder [[+wf.id]] will be
              id="item-42"
              for the resource with id 42.
              So the modifier in the &rowTpl chunk should be
              [[+wf.id:eq=`id="item-42"`:then=`<li><h1>Text</h1></li>`]]
              if the resource you want the headline before has id 42.

              But now I see you can make it easier, there is no need of &rowIdPrefix at all:
              Just use [[+id]] instead of [[+wf.id]]:
              [[+id:eq=`42`:then=`<li><h1>Text</h1></li>`]]

              [ed. note: ottogal last edited this post 14 years, 9 months ago.]
                • 37713
                • 17 Posts
                Thanks a lot, that worked like a charm. Again i m little bit smarter.