Questions tagged [dotliquid]

DotLiquid is a templating system ported to the .net framework from Ruby’s Liquid Markup.

DotLiquid is a templating system ported to the .net framework from Ruby’s Liquid Markup. It looks like this

<p>{{ user.name }} has to do:</p>    
<ul>
    {% for item in user.tasks -%}    
    <li>{{ item.name }}</li>
    {% endfor -%}    
</ul>

DotLiquid is dual-licensed

  • Apache License, Version 2.0 or
  • the Microsoft Public License (Ms-PL)

There is also fluid for .Net that tries to be as close as possible to liquid.

121 questions
12
votes
5 answers

shopify I need to check if current page is a collection page and not a single product page

I am trying to check if my current page is a collection page not a single product page in some collection. I mean for example if someone goes to collection page of shoes then I can check using collection.handle == 'Shoes' but if I select a product…
cm_w89
  • 157
  • 1
  • 2
  • 8
10
votes
3 answers

DotLiquid - checking for string "null or empty"

I'm using DotLiquid for some e-mail templates in my ASP.NET 4.0 Webforms app, and I'm trying to exclude a certain section of one of my e-mail templates if a given string in the data object I bind to the template is null or empty. Checking for NULL…
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
8
votes
2 answers

Dotliquid JSON Transformation using JSON.net

Im interested in performing JSON transformations and looked into using dotliquid. In order to avoid having a POCO for the input JSON just to be able to send it as a variable, I would like to send the deserialised JSON. From my understanding, we…
6
votes
1 answer

NU1108 error while installing DotLiquid with .Net Core

I have ASP.NET Core 2.2 i am trying to install dotliquid using nuget Install-Package DotLiquid -Version 2.0.298 but getting error Does DotLiquid support .NET Core 2.2 ?
LP13
  • 30,567
  • 53
  • 217
  • 400
5
votes
2 answers

DotLiquid/Liquid access to dictionary

I am using DotLiquid template engine and trying access dictionary value in template. I have passed to template this drop: public class SomeDrop : Drop { public Dictionary MyDictionary {get; set;} } var someDropInstance = SomeDrop…
Serg Melikyan
  • 369
  • 1
  • 5
  • 7
5
votes
4 answers

dot liquid how to escape backslash

I am facing trouble in sending data from an azure web api having a legitimate backslash(\). Data field is user id which is of following pattern: Domain\UserId I want to store it in the database as it is. But Dot liquid doesn't process it. I tried…
Tappy
  • 95
  • 1
  • 10
4
votes
2 answers

Why is DotLiquid or Azure Logic Apps automatically converting my date field?

I have a liquid template that includes a date field, which I am not using any filters on at all, but it's getting converted from 2020-04-11T22:02:11Z UTC to 4/11/2020 10:02:11 PM. Is this expected behavior of DotLiquid or Azure Logic Apps? How can I…
Joe Eng
  • 1,072
  • 2
  • 15
  • 30
4
votes
0 answers

Nugets install DotLiquid failed for .NET Framework 4.5

I'm new to Nugets install and DotLiquid, and I'm getting the following error when installing DotLiquid with Nugets: Install failed. Rolling back... Install-Package : Could not install package 'DotLiquid 2.0.64'. You are trying to install this…
xpt
  • 20,363
  • 37
  • 127
  • 216
4
votes
1 answer

Write a recursive loop in DotLiquid

I have this loop in DotLiquid: {% for page in Page -%} {{ page.Title }}
    {% for subpage in page.Pages -%}
  • {{ subpage.Title }}
  • {% endfor -%} …
Marc
  • 6,749
  • 9
  • 47
  • 78
3
votes
1 answer

JObject and DotLiquid

I'm working on a REST mock service. I use DotLiquid. I want to parse POST body into a object from XML and JSON. DotLiquid works with anonymous types, like var input = new { Body = new { Foos = new[] { new{ Bar = "OneBar" }, new { Bar = "TwoBar"…
Anders
  • 17,306
  • 10
  • 76
  • 144
3
votes
1 answer

dotLiquid Nested loop not working

I have created a dotLiquid template with two nested for loop {% for item in page.Fields %}
  • {{ item.Name }}: