パーシャルとオーバーライドテンプレートについていくつか質問があります。そのために私は次のフォルダ構造を使用しました。
projectRoot
dust-core-0.6.0.min.js
jquery.js
test.html
partial.tl
main_without_override.tl
の内容partial.tl:
{+greeting} Hola {/greeting}
{+world} World {/world}
の内容main_without_override.tl
:
{>partial/}
の内容test.html
:
<!DOCTYPE html>
<html>
<head>
<script src="dust-core-0.6.0.min.js" type="text/javascript"></script>
<script src="jq.js" type="text/javascript"></script>
</head>
<body>
</body>
<script>
$.get('main_without_override.tl', function(){
console.log(arguments);
})
</script>
</html>
そのことわざ404index.html
を取得しようとすると、ファイルがそこにあることを確認してください。main_without_override.tl
firebugが表示しているパスは正しいですが、ブラウザには404と表示されます。
私は知りたいです
- これを取得する方法
main_without_override.tl
- テンプレートを適用
main_without_override.tl
し、ブラウザでレンダリングします。
私はグーグルで検索しましたが、ほとんどの例は構文のみを示しています。main_without_override.tl
誰かがテンプレートのレンダリングを手伝ってくれませんか。