發(fā)表日期:2019-04 文章編輯:小燈 瀏覽次數(shù):3006
方法:
Html.ColumnContentData(int??columnId?=?null)
說明:默認(rèn)獲取欄目的對(duì)應(yīng)的欄目內(nèi)容表(pa_column_content)數(shù)據(jù)詳情,返回值為一個(gè)對(duì)象,參數(shù)表示欄目Id,不設(shè)置則默認(rèn)當(dāng)前欄目Id。
場景:單頁模板用得比較多,或者要讀取欄目內(nèi)容表自定義字段時(shí)候。
實(shí)例:獲取欄目內(nèi)容表中的Content字段內(nèi)容。
@{? ????var?columnContentData?=?Html.ColumnContentData(); } <div?class="content"> ????@Html.Raw(columnContentData.Content) </div>
注:html內(nèi)容默認(rèn)讀取時(shí)候會(huì)進(jìn)行HtmlEncode編碼,如果需要顯示html內(nèi)容,需要用Html.Raw()來解碼。
日期:2019-04 瀏覽次數(shù):3145
日期:2019-04 瀏覽次數(shù):3120
日期:2019-04 瀏覽次數(shù):3029
日期:2019-04 瀏覽次數(shù):2856
日期:2019-04 瀏覽次數(shù):2946
日期:2019-04 瀏覽次數(shù):3112
日期:2019-04 瀏覽次數(shù):3048
日期:2019-04 瀏覽次數(shù):3310
日期:2019-04 瀏覽次數(shù):3361
日期:2019-04 瀏覽次數(shù):3013
日期:2019-04 瀏覽次數(shù):3390
日期:2019-04 瀏覽次數(shù):2811
日期:2019-04 瀏覽次數(shù):2955
日期:2019-04 瀏覽次數(shù):3072
日期:2019-04 瀏覽次數(shù):2923
日期:2019-04 瀏覽次數(shù):3367
日期:2019-04 瀏覽次數(shù):3267
日期:2019-04 瀏覽次數(shù):2947
日期:2019-04 瀏覽次數(shù):3171
日期:2019-04 瀏覽次數(shù):3005
日期:2019-04 瀏覽次數(shù):2776
日期:2019-04 瀏覽次數(shù):3083
日期:2019-04 瀏覽次數(shù):2972
日期:2019-04 瀏覽次數(shù):3072
日期:2019-04 瀏覽次數(shù):3023
日期:2019-04 瀏覽次數(shù):2895
日期:2019-04 瀏覽次數(shù):2749
日期:2019-04 瀏覽次數(shù):2766
日期:2019-04 瀏覽次數(shù):2828
日期:2019-04 瀏覽次數(shù):2853
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.