Use a Sitecore query to determine the data source in the current context
Data Source query in Rich Text Editor
When you open the rich text editor you may see basic functionality, to enable full or specific functionality in the editor you can configure it as follows based on your requirement.
- /sitecore/system/Settings/Html Editor Profiles/Rich Text Default
- /sitecore/system/Settings/Html Editor Profiles/Rich Text Full
- /sitecore/system/Settings/Html Editor Profiles/Rich Text IDE
- /sitecore/system/Settings/Html Editor Profiles/Rich Text Medium
- /sitecore/system/Settings/Html Editor Profiles/Rich Text XA
Template Data Source
Screenshot : rich text editor template source
Screenshot : rich text editor different configurations
Query
- query:.//* - Children of the current page
- query:$home Home item of the current site
- query:.. - Parent item of the current page
- query:../.. - Parent of the parent item of the current page
- query:$home//* - Every item under site home page
- query:$home//*[@@name='News'] - Every item under site home page with additional sorting applied
- query:.//*[@@templatename='Page'] - All items of the Page template under the current item
- query:$site/*[@@name='Home']//*[@@templatename='Page'] - All items of the Page template under the Home item of the current site
SXA tokens query
- query:$siteMedia - Path to "virtual media folder" located under site
- query:$site - Path to the current site
- query:$home - A home item of the current site
- query:$linkableHomes - Paths home items from linkable sites
- query:$templates - Path to the current site-templates
- query:$theme - Currently used theme
- query:$compatibleThemes - Path to all themes
- query:$xaRichTextProfile - Returns XA.Foundation.Editing.DefaultRichTextProfile setting value.
- query:$sitelang - The context site language.
- query:$vf - The virtual folder for the context site.
- query:$partialDesigns - The root of partial designs
- query:$pageDesigns - The root of page designs
- query:$sharedSites - For multi-root fields, resolve shared site for current tenant.
- query:$lang - The context language.
- query:$rvSystemTemplates - Returns a list of templates defined in a configuration. Those templates are used to feed the AllowedInTemplates field for rendering variants.
- query:$currenttemplate - The name of the current template
- query:$tenant - Path to the current tenant
To create a custom token, refer Sitecore official document: https://doc.sitecore.com/xp/en/developers/sxa/18/sitecore-experience-accelerator/create-a-custom-token-for-a-rendering-variant.html
No comments