如何调用扩展字段?
| Visit:220
通过 Model["modelname"] 调用.
例子1:
@{
var itemabout = Cms.Col("about-us");
<div>@itemabout["position"]</div>
}
例子2,判断字段是否为空 :
if (!string.IsNullOrEmpty(Model["sub_title"] as string))
{
<h5 class="subtitle ps-25px pe-25px pt-5px pb-5px mb-15px text-uppercase text-white fs-12 ls-1px fw-600 border-radius-100px bg-gradient-dark-gray-transparent d-flex">@Model["sub_title"]</h5>
}