美文网首页
调取当前栏目父栏目自定义字段

调取当前栏目父栏目自定义字段

作者: Stonesy | 来源:发表于2020-04-10 11:27 被阅读0次
int columnId = (int)ViewBag.ColumnId;//当前栏目id
     int siteId = (int)ViewBag.SiteId;//当前站点id
     IEnumerable<dynamic> ColumnList = Html.GetColumnList(c => c.Show == 1 && c.SiteId == siteId);
    dynamic topParentData = Html.GetTopParentData(ColumnList, columnId);//获取当前栏目的父级ids
    int parentId = topParentData.Id;
    string thumbnail = Html.GetColumnContentSet(parentId).Thumbnail;

相关文章

网友评论

      本文标题:调取当前栏目父栏目自定义字段

      本文链接:https://www.haomeiwen.com/subject/wrolmhtx.html