We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27072
    • 76 Posts
    Hello,

    I would like to use the Jot call parameter "&tagid" to associate comments with the identity of the entity (celebrity) for which the document is published.

    A database query is performed in a snippet called by the template, and a placeholder is defined to identify the specific entity:
    $modx->setPlaceholder(’CelebID’, $result[’CelebID’]);

    Now, I tried to include this placeholder in my Jot call in different variations:
    &tagid=`$modx->getPlaceholder(’CelebID’)`
    &tagid=$modx->getPlaceholder(’CelebID’)
    &tagid=`[+CelebID+]`
    &tagid=`{{CelebID}}` // attempting to force parsing value in a chunk

    None of this calls produced the value contained in the placeholder.

    Can you please suggest the proper procedure to retrieve the value?

    Thanks,
    Shlomo Tommer
      Cheers,
      Shlomo Tommer
      • 33992 ☆ A M B ☆
      • 455 Posts
      Hello,
      You can use nested snippet calls:
      [!Jot? &tagid=`[[CelebID]]` .....!]


      You would see this too: Jot: Xtendable version
        God loves me. 【ツ】


        MODX.ir (Persian Support)

        Boplo.ir/modx/ (Persian)
        • 27072
        • 76 Posts
        Hello, and thank you for your reply.

        I have set a snippet named getCelebID:
        <?php
        $CelebID = $modx->getPlaceholder('CelebID');
        echo $CelebID; //also tried return
        ?>

        Then, called it from the document:
        [[Jot? &action=`form` &captcha=`1` &docid=`89` &tagid=`[[getCelebID]]`]]

        The stored value in tagid field is: [[getCelebI

        I also tried a TV named getCelebID:
        @EVAL return $modx->getPlaceholder('CelebID');

        Then, called it from the document itself:
        [[Jot? &action=`form` &captcha=`1` &docid=`89` &tagid=`[*getCelebID*]`]]

        The stored value in tagid field is: [getCelebID]

        Can you help me figure out what’s wrong?
          Cheers,
          Shlomo Tommer
          • 27072
          • 76 Posts
          Sorry, but ones I have placed the none-cache call - as you have demonstrated, everything turned A OK smiley
          [!Jot? &action=`form` &captcha=`1` &docid=`89` &tagid=`[[getCelebID]]`!]


          Thanks you again for your support.
            Cheers,
            Shlomo Tommer