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