This project is read-only.

Accessing content parts in liquid tempate

Jul 25, 2015 at 9:17 AM
I added a custom part to MenuItem type to hold icon, target and some other properties.
In Razor template (MenuItemLink.cshtml) i can access the properties of custom part using Model.Item.Content.ContentItem.MyMenuItemPart.IconClass.
But in Liquid template i cannot access these properties or even ContentItem.
Is there any way to do this?

Another question: I must compare Model.Selected property of menu item with string True. Is any way to compare it as Boolean?
Sep 29, 2015 at 12:53 AM
Edited Sep 29, 2015 at 12:53 AM
It seems I'm replying a little bit late... Sorry, didn't notice your post and didn't get notifications.
  1. Indeed there was nothing in place for that, implemented it now.
  2. Added support for booleans.
Documentation updated.
Sep 29, 2015 at 11:35 AM
Hello Dear

Thank you so much for your notice. I will check again. But have you any plan to merge these commits from the 1.8.x branch to the default branch?
Sep 29, 2015 at 12:03 PM
Yes, will merge them eventually in a few days.