[+phx:if=`[*container*]`:is=``:then=` <h1>[*longtitle*]</h1> Written by <strong>[+author+]</strong> [*content*] `:else=` <h1>[*longtitle*]</h1> [*content*] [[Ditto? &display=`1000` &total=`100` &depth=`0` &tpl=`blogditto-it` &orderBy=`createdon DESC` &sortBy=`myDate` &dateSource=`myDate` &dateFormat=`%d/ %m/ %Y`]] `+]
[+phx:if=`[*container*]`:ne=``:then=`
[*container:ne=``:then=` ... `:else=` ... `*]
<?php $editedby_id = $modx->documentObject['editedby']; // sample conversion $user_info = $modx->getUserInfo($editedby_id); $editedby_name = ($user_info['fullname'] ? $user_info['fullname'] : $user_info['username']); return $user_info['fullname']; ?>
Hi mrhaw
I have resolved with this snippet
<?php $editedby_id = $modx->documentObject['editedby']; // sample conversion $user_info = $modx->getUserInfo($editedby_id); $editedby_name = ($user_info['fullname'] ? $user_info['fullname'] : $user_info['username']); return $user_info['fullname']; ?>
Thanks very much for your help.
great snipet - with little modification i get createdbyExactly, I noticed later that editedby was not good, so I changed it with createdby:
<?php $editedby_id = $modx->documentObject['createdby']; // sample conversion $user_info = $modx->getUserInfo($editedby_id); $editedby_name = ($user_info['fullname'] ? $user_info['fullname'] : $user_info['username']); return $user_info['fullname']; ?>