Comments (7)
WE MADE IT 🙀🎉🎉
you could do it like that
@inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel>
@using Archetype.Models;
@using Newtonsoft.Json.Linq;
@{
if (Model.Items.Any())
{
var title = Model.Items.First().GetValue<string>("title");
<h3>@title</h3>
var listItem = Model.Items.First().GetValue<dynamic>("listItem");
if (listItem != null && listItem.fieldsets != null && Enumerable.Any(listItem.fieldsets))
{
JArray fieldsetListItem = listItem.fieldsets;
var list = fieldsetListItem.ToList();
var countItems = (decimal)list.Count();
var firstItems = Math.Ceiling(countItems / 2m);
<div class="product-benefit-content row">
<div class="product-benefit-content-box col-xs-12 col-sm-12 col-md-6">
@foreach (JObject item in list.Take((int)firstItems))
{
JArray properties = (JArray)item.GetValue("properties");
JObject property = (JObject)properties[0];
var value = property.GetValue("value");
<div class="product-benefit-content-box-item">
<i class="fa fa-check-circle"></i>
<p>@Html.Raw(value)</p>
</div>
}
</div>
<div class="product-benefit-content-box col-xs-12 col-sm-12 col-md-6">
@foreach (JObject item in list.Skip((int)firstItems))
{
JArray properties = (JArray)item.GetValue("properties");
JObject property = (JObject)properties[0];
var value = property.GetValue("value");
<div class="product-benefit-content-box-item">
<i class="fa fa-check-circle"></i>
<p>@Html.Raw(value)</p>
</div>
}
</div>
</div>
}
}
}
from leblender.
You rock Tobias ! good stuff.
There is a known issue about the data converter, we will upload a parche for this soon.
Thanks for your feedback
from leblender.
Model.Items.Single().GetValue<ArchetypeModel>("archetypeProperty")
Works for me...
from leblender.
@kipusoep what versions are you using?
from leblender.
since the version 1.0.4, property converter issue is fixed and works fine
from leblender.
Umbraco 7.2.5
LeBlender 1.0.4
Archetype 1.7.5
from leblender.
Seems to be solved by supporting Umbraco PropertyValue Converters
from leblender.
Related Issues (20)
- Need to cache call to PluginManager.Current.ResolveTypes
- How to get value from Umbraco.DropDown.Flexible HOT 1
- Need a reliable way to detect whether a node has been saved within a leblender partial
- Preview doesn't work if requesting node by guid instead of id
- Changes to grid.editors.config.js file can be lost in Umbraco Cloud HOT 2
- Umbraco V8 Support HOT 49
- Regarding LeBlender HOT 1
- Umbraco Security Hardening With Leblender HOT 2
- Partial grid editor being returned from Umbraco backoffice HOT 1
- Custom properties broken? -- 1.0.9.2 (from NuGet) on Umbraco 7.7.7 HOT 4
- When a new property is added to a LeBlender grid editor, it breaks editing HOT 6
- No input fields visible after fresh install on Umbraco 7.9.2 HOT 3
- LeBlender injects Bootstrap Styles into Backoffice HOT 3
- Caching shows first editors content in all other editors place HOT 6
- Links in admin tree is not working after few clicks with leblender 1.0.8.4 HOT 1
- LeBlender Editor top-level property on whole set of items HOT 2
- Cache by member HOT 7
- Confusing property editors HOT 5
- Automate deployment
- Cell / Row config HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leblender.