I'm creating a custom grid layout view for a grid layout however I've hit the issue of class being a keyword in razor. Any ideas how I can get the JSON value? Tried @@class and @(@class) with no success
@foreach (var section in grid.sections)
{
foreach (var row in section.rows)
{
foreach (var area in row.areas)
{<div class="@area.grid.class header-item">
@foreach (var control in area.controls)
{
string imageId = control.value.id.ToString();
<img alt="@Umbraco.Media(imageId).Name" src="@Umbraco.Media(imageId).Url?width=350&height=179&mode=crop&anchor=top&slimmage=true" />
}
</div>
}
}
}
Getting class value of area in grid
Hi all,
I'm creating a custom grid layout view for a grid layout however I've hit the issue of class being a keyword in razor. Any ideas how I can get the JSON value? Tried @@class and @(@class) with no success
class added through settings on the grid property editor
Solution was to change the default key value to 'cssclass'
is working on a reply...