I've written a custom liquid tag called CurrentLocale, and I can
access it and output it's value on my Liquid templates just fine using
{% current_locale %}.
However, I want to use this in conjunction with the built in include
tag. So I've been trying to use it this way:
{% include "{{ current_locale }}/some_partial_here" %}
I have tried it this way as well
{% include "{% current_locale %}/some_partial_here" %}
where current_locale points to a different directory where the partial
lives
Of course neither work, does any have anyone have an idea on a
solution?
{% capture partial_location %}{% current_locale %}/some_partial_here{%
endcapture %}
{% include partial_location %}
> --
> You received this message because you are subscribed to the Google Groups "Liquid Templates" group.
> To post to this group, send email to liquid-t...@googlegroups.com.
> To unsubscribe from this group, send email to liquid-templat...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liquid-templates?hl=en.
>
>
On Feb 24, 8:00 pm, Nick Pearson <nick.pear...@gmail.com> wrote:
> Capture the location into a variable, then use the variable in the include:
>
> {% capture partial_location %}{% current_locale %}/some_partial_here{%
> endcapture %}
> {% include partial_location %}
>