We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2458
    • 27 Posts
    Не смог разобраться в документации по использованию TV-параметров.
    Цитирую:
    You make template variables as usual, except for the default contents which must be initialized to the current value of the news that’s been edited. This is done via an @EVAL binding.
    @EVAL
    if (isset($_REQUEST[’editid’]) && $_REQUEST[’editid’] != ’’) {
    $editid = $_REQUEST[’editid’];
    $tbl = $modx->getFullTableName( ’site_content’ );
    return $modx->db->getValue( "SELECT content FROM $tbl WHERE (id = $editid)");
    }
    return ’’;
    Note that you must modify the 5th line to get the correct field from the table: content or introtext (for the summary).
    Когда в TV прописываю эту привязку, modX ругается
    Parse error: syntax error, unexpected $end in /public_html/manager/includes/tmplvars.commands.inc.php(60) : eval()’d code on line 2

    Modx Evo 1.03
    Прошу помощи, может кто сумел одолеть newsmanager?