On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,

    I’m trying to call a chunk with placeholder.

    It’s working only for classic placeholder, not for test with PHX.
    Example :
    $modx->setPlaceholder('id', $row["id"]);
    $modx->setPlaceholder('pagetitle', $row["pagetitle"]);
    $modx->setPlaceholder('description', $row["description"]);
    $modx->setPlaceholder('introtext', $row["introtext"]);
    $resultat.= $modx->getChunk('mytpl');
    


    And mytpl :
     <div class="texte">
            <table>
              <tr>
                <td class="titre">
                  <h2><a href="/[~[+id+]~]" title="[+longtitle+]">[+pagetitle+]</a></h2>
                </td>
                <td class="description">
                  [+phx:if=`[+description+]`:is=``:then=``:else=`<a href="/[~[+id+]~]" title="[+longtitle+]">[+description+]</a>`+]
                  <a href="/[~[+id+]~]" title="[+longtitle+]">[+introtext+]</a></p>
                  <p class="date"><a href="/[~[+id+]~]">[[afficheDate? &id=`[+id+]`]]</a></p>
                </td>
              </tr>
            </table>
          </div>
    


    The PHX is not executed ...

    Do you have any idea this problem ?

    Thanks for helping

    Cyril