You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have been using Fluid and greatly appreciate its flexibility and performance. However, I came across a limitation when attempting to implement custom dynamic variables or directives using the {{...}} syntax. Specifically, I would like to support cases like: {{$guid}}. where $guid is a dynamic directive that generates a value at render time (e.g., a GUID).
Currently, this syntax is not supported because Fluid interprets the {{...}} syntax as an expression and expects the content to resolve to a context variable. This makes it challenging to define custom dynamic tags or directives without resorting to {% ... %} blocks or other workarounds. I tried implementing this behavior by extending FluidParser and using RegisterTag, but:
It seems that RegisterTag is specifically tied to {% ... %} syntax.
{{$guid}} is not acceptable by parser as a valid template string.
Request:
Would it be possible to introduce support for custom tags or directives within the {{...}} syntax? For example:
Allow parsing and handling custom directives like {{$...}} as an extension point in FluidParser.
Provide a hook or registration method for handling such patterns, similar to RegisterParserTag but scoped to {{...}}.
The text was updated successfully, but these errors were encountered:
Hi, I have been using Fluid and greatly appreciate its flexibility and performance. However, I came across a limitation when attempting to implement custom dynamic variables or directives using the {{...}} syntax. Specifically, I would like to support cases like:
{{$guid}}
. where $guid is a dynamic directive that generates a value at render time (e.g., a GUID).Currently, this syntax is not supported because Fluid interprets the {{...}} syntax as an expression and expects the content to resolve to a context variable. This makes it challenging to define custom dynamic tags or directives without resorting to {% ... %} blocks or other workarounds. I tried implementing this behavior by extending FluidParser and using RegisterTag, but:
Request:
Would it be possible to introduce support for custom tags or directives within the {{...}} syntax? For example:
The text was updated successfully, but these errors were encountered: