In SXA's out of the box renderings, I see datasource locations that look like this:

query:$site/*[@@name='Data']/*[@@templatename='Custom Folder']

Is $site the only token supported here? Can I inject my own tokens?


SXA tokens

There are other tokens as well:

  • $compatibleThemes - path to all themese
  • $theme - currently used theme
  • $pageDesigns - root of page designs
  • $partialDesigns - root of partial designs
  • $currenttemplate - name of the current template
  • $tenant - path to the current tenant
  • $site - path to the current site
  • $home - path to the current site start item (Home)
  • $templates - path to the current sitetemplates
  • $siteMedia - path to Virtual Media folder located under site
  • $sharedSites - for multiroot fields, resovles shared site for current tenant.

How to define custom tokens

You can define your own tokens by adding additional processor to resolveTokens pipeline


please follow below links for details in token customization.


You have to extend the "resolveVariantTokens" processor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.