0
例如,使用rainlab translate插件,我們可以有這個{{ 'translatable text'|_ }}
我想在動態標題的代碼部分調用它們。如何在代碼部分運行標記部分的功能?
title = "Product" <-- I want to translate this
url = "/product"
layout = "default"
==
<section id="product-section">
</section>
另一個例子是博客插件。我希望根據博客文章標題設置標題。我可以在標記部分使用{{ 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>