Less than 1 minute read

$page->getValue('pageid')

or

[$page->page'pageid']

In Smarty, these are all available as is eg

{$pageid}