I tried to use the following code in my rteTV’s Default Value as the documents say:
@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 '';
It lead to this error message even after removing the (extra?) space before "SELECT and adding the modx_ prefix to the table-name:
[tt]Parse error: syntax error, unexpected $end in K:\xampp\htdocs\modx\manager\includes\tmplvars.commands.inc.php(60) : eval()’d code on line 2[/tt]
Then I tried this instead:
[[DynContent? &docid=`[+editid+]`]]
...and it does the job!!!
A few problems left in the NewsManager:
1. The "Hide/Show in menu" button doesn’t get its label.
2. The "Publish/Unpublish" button sticks to "Unpublish" even after doing its job.
And another question about the FCKEditor in NewsEditor: it is showing up with Custom Toolbar Set, although in Manager>Tools>Config the Advanced Toolbar Set is choosen. Where to set this for the frontend instance also?
Very nice pair of Snippets anyway!