1 回答

TA貢獻1786條經驗 獲得超11個贊
作為解決此問題以更接近所需功能的解決方法,我實施了以下(不太理想)解決方案:
base_content_view.html
{{template "begin_content.html" . }}
? <!-- content here -->
{{template "end_content.html" . }}
begin_content.html
{{template "header.html" . }}
<div class="container">
? <div class="row">
? ? {{template "flash.html" .}}
? </div>
? ? <!-- Left column of Content -->
? <div class="col-md-9 col-sm-8 col-xs-12">? ??
end_content.html
? </div>
? <!-- //Left Column of Content -->
? <!-- Right column of summary -->
? <div class="col-md-3 col-sm-4 hidden-xs">
? ? <div class="container">
? ? ? {{template "sidebar.html" .}}
? ? </div>
? </div>
? <!-- //Right column of summary -->
{{template "footer.html" .}}
base_content_view.html 是一個靜態文件,在創建新視圖時將其復制粘貼為模板。此設計確實會引發其他問題,但可作為功能限制的示例解決方法template。
- 1 回答
- 0 關注
- 123 瀏覽
添加回答
舉報