模塊后臺模板可以根據(jù)自己的需求來寫,但語法一定要參考原模板。
操作方法:
將 diy/dayrui/templates/admin/模塊的模板.html 復(fù)制到 diy/app/模塊目錄/templates/my/模塊的模板.html
3.5以下的版本是復(fù)制到:
將 diy/dayrui/templates/admin/模塊的模板.html 復(fù)制到 diy/app/模塊目錄/templates/admin/模塊的模板.html
這樣你就可以在模塊目錄下去改自己的模板,就不會影響其他模塊的顯示;
后臺模塊模板有以下幾個:
content_add.html 發(fā)布內(nèi)容 content_data.html 列表的數(shù)據(jù)項 content_draft.html 內(nèi)容草稿 content_edit.html 審核編輯 content_verify.html 審核列表 content_extend_add.html 子內(nèi)容發(fā)布 content_extend_edit.html 子內(nèi)容審核編 content_extend_index.html 子內(nèi)容列表 content_extend_verify.html 子內(nèi)容審核列表 comment_index.html 評論列表 comment_show.html 查看評論 category_index.html 欄目列表
例如需要給news模塊列表頁加幾個字段顯示?
1、復(fù)制到news模塊
將 diy/dayrui/templates/admin/content_data.html 復(fù)制到 diy/app/news/templates/my/content_data.html
2、修改新文件,加一個字段,例如test
3、這個test字段一定要是主表字段,附表不能顯示的,例子我們以文本類型字段為例,其他復(fù)雜的字段需要手動格式化輸出
4、預(yù)覽效果
文檔最后更新時間:2018-11-12 08:05:00