0
たとえば、rainlab translateプラグインを使用すると、私はこれを持つことができます{{ 'translatable text'|_ }}
私は動的なタイトルのコードセクションで呼びたいと思います。コードセクションでマークアップセクションの関数を実行する方法は?
title = "Product" <-- I want to translate this
url = "/product"
layout = "default"
==
<section id="product-section">
</section>
もう1つの例は、ブログのプラグインです。タイトルはブログ投稿のタイトルに合わせて設定します。マークアップセクションで{{ post.title }}
を使用できます。
title = "Blog Title" <-- I want to put the blog title here
url = "/blog-post/:slug"
layout = "default"
==
<section id="blog-section">
<h1><span>{{ post.title }}</span></h1>
</section>