There is “magic” _CTX global variable available from which you can access some context-specific values. Currently the following keys are available:

  • _CTX.currentPage providing access to the currently open page (PageMeta object)
  • _CTX.sourcePage the page the expression's text comes from ({ name = … }): the transcluded page inside a transclusion, otherwise the current page