Hi,
For many reasons (some smarter, others not so much), I’d like to have a note template that supports multiple HTML elements.
For example:
- note with a paragraph
- note with a paragraph and an image
- note with a paragraph, an image, second paragraph, another image
- note with 3 paragraphs and 3 ordered lists
Having a template, such as the following, allows only having a bunch of text in the note.
I could go down the route of having a separate template for each of the cases listed above, but it feels like an overkill.
Also, liquid statements such as:
{% include note.html content=“Some text”
{% include image.html file=“some/path” %}
%}
are obviously not supported.
Is there a way to push another nested HTML chunk within an include in a way similar to the one above??
Is there a way to support multiple HTML markups in the note.html template, but enabling them optionally with if statements… well there obviously is:
{% if include.para1 %}
{% include.para1 %}
{% endif %} etc.but also, having logic that allows to order them in the way I want to do, such as:
{% include note.html
para1="Some texxt"
para_pos="1"
para2="Another text"
para2_pos="3"
image1_file="some/path/file.png"
image1_alt="Some alternate text"
image1_pos=“2”
%}
I seem unable to figure out how to do this ordering bit…
This would make a potential note.html file very flexible and would make markup easy to understand and implement.