For some reason, the [+author+] placeholder displays nothing when I use the standard Ditto chunk to call it. All other placeholders are working except for that one. The html ignores the call completely, as if it’s not there at all. My template call is
[!Ditto? &parents=`52` &display=`5` &orderBy=`createdon DESC` &tpl=`NewsLatest` &debug=`1`!]
Where NewsLatest is the standard Ditto-news chunk. The debug screen shows me that [+author+] is a custom field. I thought it came from the db...?
Still haven’t figured this one out. I have a workaround, but considering that my installation is pretty fresh, everything should be working as documented. So, this concerns me a bit. Anyone else had a similar problem?
Are you using a front-end snippet?
Test to see what you get using this snippet:
http://modxcms.com/forums/index.php/topic,34505.msg223341.html#msg223341
The problem for web users is (read Dimmy):
http://modxcms.com/forums/index.php/topic,34505.msg227867.html#msg227867
What I use:
<?php
$output = '';
$docnum = $modx->documentIdentifier;
$val= $modx->db->getValue('SELECT `createdby` FROM `modx_site_content` WHERE `id` = '.$docnum.'');
if ($val >= 0){
$rs= $modx->db->getValue('SELECT `fullname` FROM `modx_user_attributes` WHERE `id` = '.$val.'');
}
else {
$val = abs($val);
$rs= $modx->db->getValue('SELECT `fullname` FROM `modx_web_user_attributes` WHERE `internalKey` = '.$val.'');
}
$output .= ''.$rs.'';
return $output;
?>