We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16183
    • 1,390 Posts
    Quote from: rthrash at Jun 10, 2009, 06:36 AM

    File away please with full details on what this affects. Thanks!

    Done.

    /k
      • 10313
      • 375 Posts
      Quote from: kongondo at Jun 11, 2009, 09:47 AM

      I’m not sure I understand what this [+wf.iterator+]does and what is its matching parameter (i.e. how to specify it in the WF call)? Enlighten me please? Thanks.

      Secondly, there is this [+wf.outerid+] which I guess is for inserting an id to the outerTpl. Again, what is its matching parameter? And, is it also applied to the innerTpl?

      Thanks.
      /k

      As far as I understand it, wf.iterator is "just" a number that is incremented from item to item, so there is no need for a parameter.

      The outer id can not be added also to the innerTpl, because it MUST not. An ID is a unique identificator.

      Martin
        • 16183
        • 1,390 Posts
        Quote from: FuryDE at Jun 11, 2009, 09:54 AM

        Quote from: kongondo at Jun 11, 2009, 09:47 AM

        I’m not sure I understand what this [+wf.iterator+]does and what is its matching parameter (i.e. how to specify it in the WF call)? Enlighten me please? Thanks.

        Secondly, there is this [+wf.outerid+] which I guess is for inserting an id to the outerTpl. Again, what is its matching parameter? And, is it also applied to the innerTpl?

        Thanks.
        /k

        As far as I understand it, wf.iterator is "just" a number that is incremented from item to item, so there is no need for a parameter.

        The outer id can not be added also to the innerTpl, because it MUST not. An ID is a unique identificator.

        Martin

        Thx Martin.

        I feel so stupid, hehe! Of course it can’t, its an id! I preach this all the time and here I am asking the obvious! Anyway, I’m having one of those bad hair days, ha!

        The iterator can be really handy then. Someone asked about incremental classes to their rows the other day.

        cheers/k

          • 10313
          • 375 Posts
          Quote from: sheeplover at May 19, 2009, 04:47 AM

          [+wf.level+] works, but it doesn’t work in the &innerTpl ... this template doesn’t seem to know levels .. why is that?

          Hey, I also needed [tt][+wf.level+][/tt] ("thanks" to kyle, that the level is available at all now) to "level" my submenus. For me the follwing trick did it:

          The [tt]&innerTpl[/tt] usually is something like [tt]<ul [+wf.id+][+wf.classes+]>[+wf.wrapper+]</ul>[/tt].

          I changed [tt]&innerTpl[/tt] to just [tt][+wf.wrapper+][/tt] and added the "<ul> .. </ul>" part in the [tt]&parentRowTpl[/tt] just around the [tt][+wf.wrapper+][/tt] in that chunk. On row level, I can use the [tt][+wf.level+][/tt] for the "inner" <ul>.

          Understood it, or was I too complicated?

          Martin
            • 18878
            • 210 Posts
            Quote from: kongondo at May 13, 2009, 01:07 PM

            is WF beta 2.5 phx clashing with ditto’s phx.pre.class..?

            When navigating my site, I am getting this error after installed WF2.5 beta (sorry couldn’t test this earlier)

            Fatal error: Cannot redeclare class prePHx in C:\wamp\www\modxtests\assets\snippets\ditto\classes\phx.pre.class.inc.php on line 11

            How do I deal with this please? Thanks

            cheers/k

            modx 0963
            server wamp



            Any news about this error? I just downloaded the snippet, installed and the error showed up after the first click.

            Regards.
              • 10313
              • 375 Posts
              Quote from: mcclausky at Jun 23, 2009, 11:25 PM

              Any news about this error? I just downloaded the snippet, installed and the error showed up after the first click.
              Have a look at my post on page 2, I describe a solution there.
              Martin
                • 18878
                • 210 Posts
                Quote from: FuryDE at Jun 24, 2009, 12:00 AM

                Have a look at my post on page 2, I describe a solution there.
                Martin

                Thanx Martin, I must have skipped page 2.

                Your solution worked, but in my case I had to change line 29 from
                if ($phx ) {

                to:
                if ($phx && !class_Exists("prePHx")) {

                Thank you!
                  • 18878
                  • 210 Posts
                  Hi,

                  I just tested the 2.5 beta version and seems to be working fine (with the phx workaround). Odd and even classes work great, but I’d like to have more control over the items. Is it possible to have every <li> item with a different class? Some setting that instructs Wayfinder to automatically assign a unique class to every item, something like this:

                  <li class="item1"> </li>
                  <li class="item2"> </li>
                  <li class="item3"> </li>
                  etc

                  Your help will be appreciated.

                  Regards.

                  EDIT: I just read that this might be possible with the Iterator placeholder [+wf.iterator+]. Can anyone provide an example please?
                    • 16183
                    • 1,390 Posts
                    Maybe....

                    <li class="item[+wf.iterator+]"> some other placeholders here </li>


                    in your, say, rowTpl. Untested

                    cheers/k
                      • 10313
                      • 375 Posts
                      Quote from: kongondo at Jun 24, 2009, 11:14 AM

                      <li class="item[+wf.iterator+]"> some other placeholders here </li>

                      Looks like it could work. But if you are using unique (!) classes, can you use ID instead? The parameter [tt]&rowIdPrefix=`item`[/tt] will provide each [tt]<LI>[/tt] with an [tt]id="item"[/tt], "item" followed bei the document id.

                      Martin