My _layouts/recipe.html file uses Liquid's include tag
to incorporate HTML and CoffeeScript content into the
document's HEAD, eg:
{% include demo_1/external_js.html %}
<script type="text/coffeescript">
# <![CDATA[
{% include demo_1/lib_chart.coffee %}
{% include demo_1/lib_query.coffee %}
{% include demo_1/lib_table.coffee %}
{% include demo_1/main.coffee %}
# ]]>
</script>
This works OK for a demo, but it isn't a general solution.
In order to use the layout with multiple pages, I need a
way to let the page specify which files to include.
Suggestions?
-r
--
http://www.cfcl.com/rdm Rich Morin
http://www.cfcl.com/rdm/resume r...@cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841
Software system design, development, and documentation
One thought I had was to use a capture in the page body,
then evaluate it in the layout, eg:
Layout:
{{ cs_code }}
Page:
{% capture cs_code %}
<script type="text/coffeescript">
# <![CDATA[
{% include demo_1/lib_chart.coffee %}
{% include demo_1/lib_query.coffee %}
{% include demo_1/lib_table.coffee %}
{% include demo_1/main.coffee %}
# ]]>
</script>
{% endcapture %}
Problem is, I'm not sure how to name the capture variable
so that it passes between the page and the layout. Is
this even possible?