We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4195
    • 398 Posts
    are you getting redirected if you disable PHx ? wink
      Armand Pondman
      MODx Coding Team
      :: Jot :: PHx
      • 23050
      • 1,842 Posts
      It’s ok... I had to put all snippet calls cached and now it works fine. Sorry for not having tested it before.

      Also, a GetField call still doesn’t show anything in a Ditto chunk. Here is my chunk :
      <div>
      <h5><a href="[~[+id+]~]">[+title+]</a> - [+date+]</h5>
      <p class="dossier">>> [[GetField? &docid=`[+parent+]`]]</p>
      <div class="resume">[+summary+]<p><a href="[~[+id+]~]" title="[+longtitle+]">[...]</a></p></div>
      </div>


      I test to put cached and uncached but doesn’t work. GetField returns nothing.

      Mark thinks there is something to see with PHx parent field selector

      Thanks a lot for your help bS wink
        • 11975
        • 2,542 Posts
        grin I’m feeling stupid

        My bad on this one.
        I’ve checked the page settings and the first child template was blank.

        Perrine has the same issue on a current project.
        I don’t think she made the same mistake;
        I hope she join the discussion.

        :-)
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 4195
          • 398 Posts
          oke so firstChildRedirect does work...

          and now for GetField. Does [+parent+] give you a value in the ditto chunk?
          To test this place it outside of the GetField snippet and check if it returns something.
            Armand Pondman
            MODx Coding Team
            :: Jot :: PHx
            • 23050
            • 1,842 Posts
            Yes Helio, I’m here ! :p Tha blank page was on the folder, not the document... and with cached call, all work except GetField call in Ditto.

            bS : [+parent+] does work fine.

            I found this page on PHx documentation and there’s something about parent. May I use this placeholder : [+variable:parent=`field`+] ?

            I give it a test and tell you wink

            Edit : It’s ok ! [+id:parent=`pagetitle`+] returns the same output like [[GetField? &docid=`[+parent+]`]] (don’t forget to create phx:parent snippet mentionned on the documentation). Thx for your help wink
              • 4195
              • 398 Posts
              You’ll have to create a snippet like the example mentioned in the wiki and then you can use that if you want.

              But... doesn’t [[GetField? &docid=`[+parent+]`]]  need another parameter to return something?
                Armand Pondman
                MODx Coding Team
                :: Jot :: PHx
                • 23050
                • 1,842 Posts
                Quote from: bS at Nov 14, 2006, 02:40 AM

                But... doesn’t [[GetField? &docid=`[+parent+]`]] need another parameter to return something?

                No, it doesn’t need anything else. Before activating PHx, it was working fine. Please, note that it doesn’t work only in Ditto chunk. Otherwise, it works fine when it’s cached.
                  • 4195
                  • 398 Posts
                  I downloaded GetField and put a straight [[GetField]] call on a page with PHx enabled.. and that works like it should (tried both cached and uncached) I also tried with the docid parameter and again it worked like it should...  maybe we are missing something.

                  are you using PHx 2.0 latest version from the repository?
                    Armand Pondman
                    MODx Coding Team
                    :: Jot :: PHx
                    • 23050
                    • 1,842 Posts
                    Yes 2.0 but did you try it in a Ditto chunk ?

                    I mean, make a Ditto call and in the chunk you use as &tpl, put a GetField call. Does this work ?
                      • 4195
                      • 398 Posts
                      Yes it does  (Ditto 1.0.2)

                      I’m just trying to pinpoint the exact location of your issue, but I can’t reproduce it sad

                      edit: i just read your edit in the other reply that you solved it by using the custom modifier.. smiley
                        Armand Pondman
                        MODx Coding Team
                        :: Jot :: PHx

                      This discussion is closed to further replies. Keep calm and carry on.