HTMLとFreemarkerの構文が混在しているデータベースから文字列値を取得しています。Freemarker変数で文字列HTMLを解析する方法
ので、同様:
<p>${fragment.title}</p>
<table id='resultsTable' class='material-table'>
<tr>
<th>Instruction</th>
<th>Action</th>
</tr>
Test
</table>
され、次の私は、Freemarkerのテンプレートに上記の文字列にアクセスする方法:
<#include "inc/header.ftl">
<body>
<#include "inc/navigation.ftl">
<div class="container">
<div class="row">
<#if fragments??>
<#list fragments as fragment>
<div class="col-sm-6">
<div class="fragment">
${fragment.design?html}
</div>
</div>
</#list>
</#if>
</div>
</div>
</body>
<#include "inc/footer.ftl">
しかし、出力が非常に適切ではありません。
<p>${fragment.title}</p> <table id='resultsTable' class='material-table'> <tr> struction</th> </th> </tr> ddd </table>
Freemarkerを使用してHTMLを解析し、${fragment.title}
の値を同時に解析するにはどうすればよいですか?
includeに 'parse = true'オプションを使用できますか? '<#include" inc/headerのようなものです。ftl "parse = true>' – varren
フラグメント化されていない 'fragment.design'文字列内のFreemarker変数です – crm