how to use {% include 'header' %} / Liquid error: This liquid context does not allow includes.

1,517 views
Skip to first unread message

fero

unread,
Oct 20, 2008, 4:28:22 AM10/20/08
to Liquid Templates
hello nerds

i am trying to structure my templates in a very simple way, and want
to use something like ordinary include ... which simple includes file
content in the template. i've explored mephisto templates find
something like:

{% include 'header' %}

but when I use it, I obtain only:

Liquid error: This liquid context does not allow includes.

please, how to do that?

thanks a lot.

fero.

fero

unread,
Oct 20, 2008, 6:31:36 AM10/20/08
to Liquid Templates
this is the answer:

Liquid::Template.file_system =
Liquid::LocalFileSystem.new(template_path)
liquid = Liquid::Template.parse(template)
Reply all
Reply to author
Forward
0 new messages