Since 2.2.1, it is possible to include predefined variables about the page, the space, the author, the current user. Here is the list of available pre-defined variables:
$username, $userName, $userFullName, $email
$pageTitle, $pageId(The title and id of the page or blog post. For comments, it's the title and id of the hosting page.)
$ceoType, $ceoId("page", "blogpost", "comment", etc. $ceoId will be equal to $pageId in most cases except Comments.)
$parentPageTitle, $parentPageId(The parent page, in case of a page)
$creator, $lastModifier(The login of the creator and last modifier)
Note that we don't use $pageName but $pageTitle.
How to include built-in parameters in the Query Editor
In the Query Editor, click Add Options, then Built-in Parameters:
The "Built-in parameters" will appear in the options, and they will be replaced as long as you keep them:
The macro can then be inserted in a page:
You know how to use built-in parameters and which parameters exist.