fluid icon indicating copy to clipboard operation
fluid copied to clipboard

Render method with parameters not working?

Open mtirionMSFT opened this issue 4 years ago • 1 comments

I have a liquid-file 'data-converters\gender.liquid' with this content:

{%- case gender -%}
    {%- when "M" -%}male
    {%- when "F" -%}female
    {%- else -%}other
{%- endcase -%}

I uses include with a parameter like this:

{% include 'data-converters/gender', gender: "F" %}

This works as expected. Also when I change this to the now to be used render statement, the output is the same. But when I replace that with an object with a field the include works, but the render does not. It looks like the parameter is not passed?

mtirionMSFT avatar Dec 07 '21 15:12 mtirionMSFT

when I replace that with an object with a field

Can you show what you mean?

sebastienros avatar Dec 08 '21 15:12 sebastienros