Yes, this is possible. There is an easy way to extend/add logic which is missing by implementing custom Variant Token.
This is an example implementation of
public class ResolveParentName : ResolveVariantTokensProcessor
public override string Token => "$parentName";
public override void ResolveToken(ResolveVariantTokensArgs args)
// this if statement is quite important in order to support this token in JSON Variants
if (args.ResultControl != null)
Text = args.ContextItem.Parent.Name
args.Result = args.ContextItem.Parent.Name;
Do not forget about registering this processor:
<processor type="YOUR_NAMESPAVE.ResolveParentName, YOUR_ASSEMBLY" resolve="true" />
Here is an example usage:
As you can see this is a great place to add a lot of custom logic and extend Rendering Variants. In the above example, I'm just using one
args.ContextItem.Parent.Name property but you can do whatever you need there.
UPDATE: Please use lowercased token names (instead of
$parentName go with