之間的區別<body>
和<g:layoutBody>
之間的區別是什麼?如何使用這些標記?<body>與<g:layoutBody>
-1
A
回答
0
- body標記是一個HTML標記。 (與grails無關)
- g:layoutBody應該在模板中使用以允許具體視圖將其數據注入到模板中。
0
Official documentation對g:layoutBody
是相當有幫助的。
特別是,這是他們的裝飾佈局a.k.a. main.gsp
的例子。在這個例子中,<g:layoutBody />
將被替換爲要裝飾的文檔的主體(例如index.gsp
),當然,<g:layoutHead />
將被替換爲要裝飾的文檔的頭部。
<html>
<head>
<script src="global.js" />
<g:layoutHead />
</head>
<body><g:layoutBody /></body>
</html>
相關問題
- 1. ASP.NET <%#與<%
- 2. SBT,<< =與
- 3. < - ,[[< - ,$ < - 和:=與環境
- 4. MVC2 <%:tag與<%=
- 5. TinyMCE的<與<
- 6. <textview></textview>與<textview />
- 7. <xsl:sort>與<option>
- 8. <text>與<span>
- 9. Asp.net MVC與<%:和<%=
- 10. 替換<與<元件
- 11. <Flags>與<FlagsAttribute()>
- 12. 算術與<<操作
- 13. <button>與<fieldset>
- 14. <iostream>與<iostream.h>與「iostream.h」
- 15. git「<<<<<<< HEAD」
- 16. 「<<<<<<< HEAD」模板
- 17. Heredoc <<<或<<?
- 18. XSD <element><complexType><sequence>與<element><sequence>
- 19. operator <<:std :: cout << i <<(i << 1);
- 20. 與<T>
- 21. 與<textarea>
- 22. 與<wicket:link>
- 23. <ABC與Ajax.BeginForm
- 24. 與<function>
- 25. 與< or >
- 26. 與<h:panelGrid>
- 27. 與LT選擇
- 28. << <<超載
- 29. github增加<<<<<<< HEAD
- 30. 移動與<tab><s-tab>
layoutBody - 輸出目標頁面body標籤內容 – 2013-04-27 16:35:50
所以,如果我想用身體我必須首先包括layoutBody標籤? – user2279392 2013-04-27 16:38:58