<![CDATA[ Modx Evo, getchunk & PHX - My Forums]]> https://forums.modx.com/thread/?thread=45430 <![CDATA[Modx Evo, getchunk &amp; PHX]]> https://forums.modx.com/thread/45430/modx-evo-getchunk-phx#dis-post-262385
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]]>
represent70 Aug 02, 2011, 04:32 AM https://forums.modx.com/thread/45430/modx-evo-getchunk-phx#dis-post-262385