When reading the code below, please note that: {sample_text} means optional.
On the left might be…
"Printed <<$$date.formatted>>{ at <<$$time.formatted>>}{ by <<$$accountName>>}{ from <<$$userName>>}"
"On the right might be “{{PageNumber}}{ of <<$$total pages>>}"
In the center might be "LayoutID <<$$ID>>”
2 of the 3 text blocks above could be built as…
<<$$report.metadata.left>>
<<$$report.metadata.center>>
…from Scripts.
Using merge variable instead of global fields would afford good code portability.
It does not seem as if you can get the {{PageNumber}} to render within a $$var...so that the text on the right would be hard coded on the layout.
Thoughts?