I am editing a shopify template liquid page where inside is consisting of the
{%raw%} {{item}} {% endraw %}
I tested the code by adding :
{%raw%} {% assign myvar = {{item}} %} {{myvar}} {% endraw %}
instead its printing all of it as a raw html, is there anyway that I can overcome this as I need to get the variable printed out in that specific tag
thank you!
update :
{% raw %}
<form action="/cart" method="post" novalidate class="cart ajaxcart">
<div class="ajaxcart__inner">
{{#items}}
<div class="ajaxcart__product">
<div class="ajaxcart__row" data-line="{{line}}">
<div class="grid">
<div class="grid__item one-quarter">
<a href="{{url}}" class="ajaxcart__product-image"><img src="{{img}}" alt=""></a>
</div>
<div class="grid__item three-quarters item-meta">
<div class="grid--full display-table">
<div class="grid__item display-table-cell three-quarters cart-item">
<a href="{{url}}" class="ajaxcart__product-name">
{{name}}
</a>
something like this but once I removed the raw tags somehow the content inside are not rendering??
{% raw %}
is to output the liquid code as a text. If you like to output the liquid code, don't use it between{% raw %}
tag. – dripassign
worked, all you would get is the literal string{{item}}
, which I doubt is what you want. – Dave B