php-liquid icon indicating copy to clipboard operation
php-liquid copied to clipboard

Dynamic Include

Open maicolbruski opened this issue 7 years ago • 14 comments

Hi,

It's possible create a include dynamic with a custom variable? For example in loop:

{% for item in files %} 
   {% include item.file %}
{% endfor %}

Tks.

maicolbruski avatar Nov 22 '17 21:11 maicolbruski

It seems like this is possible in the stock Liquid, or in the Jekyll, at very least:

{% include {{ my_variable }} %}

I haven't checked yet if we are handling this case in PHP Liquid.

sanmai avatar Dec 05 '17 00:12 sanmai

In PHP Liquid does`t work. =(

maicolbruski avatar Dec 05 '17 11:12 maicolbruski

nothing yet?

maicolbruski avatar Jul 23 '18 14:07 maicolbruski

It doesn't seem like there was any volunteer.

sanmai avatar Jul 24 '18 03:07 sanmai

Hello, I really need this: {% include {{ my_variable }} %}

There seems to be a solution made for this fork: https://github.com/harrydeluxe/php-liquid/issues/14

Can someone make it happen? Much appreciated

HappyLDE avatar May 30 '19 08:05 HappyLDE

Nice find! I've made a PR for time being, but it'll require more work.

sanmai avatar May 30 '19 08:05 sanmai

Any news for this?

HappyLDE avatar Jul 07 '19 11:07 HappyLDE

I wonder if you can try you hand with this job. What do you think?

My hands are tied at least until autumn.

sanmai avatar Jul 09 '19 02:07 sanmai

I have no idea what to do

HappyLDE avatar Jul 13 '19 17:07 HappyLDE

I'd start with taking tests from #125, and then proceed with other changes, except for static variables.

sanmai avatar Jul 14 '19 03:07 sanmai

I will take a look at this!

HappyLDE avatar Jul 21 '19 07:07 HappyLDE

Hi - is there any update on a fix for this?

thomasgreen avatar Nov 14 '19 10:11 thomasgreen

I'm here to review any PR with this feature.

sanmai avatar Nov 14 '19 11:11 sanmai

any news after 2 years?

miky9585 avatar Jul 12 '21 14:07 miky9585