It’s a nice feature request, but I think you’d have to use a snippet at present:
[[GetPagetitle? &pageId = 2]]
<?php
/* GetPagetitle snippet */
$resource = $modx->getObject('modResource', $pageId));
return $resource->get('pagetitle');
This might be more efficient (though I’m not sure I have it right):
<?php
/* GetPagetitle snippet */
/* build a new xPDOQuery object, similar to getObject() */
$query = $modx->newQuery('modResource', $pageId);
/* indicate you only want to select the pagetitle column */
$query->select('pagetitle');
/* prepare the PDOStatement and execute it directly */
if ($query->prepare() && $query->stmt->execute()) {
/* use PDOStatement->fetchColumn() to just get the first column of
the current row of the result set */
return($query->stmt->fetchColumn());
}