我想分離我的內容和視圖(而不是反高潮,我知道)。我想要的就像gettext,我可以在視圖中有一個鍵。像Content_Materials_Index_Description
之類的東西,然後使用類似echo "@Content_Materials_Index_Description"
的東西,以呈現我已經存儲在一個單獨的文件中的3-4段內容。在Zend Framework中外部化內容
我知道如何在Java/J2EE應用程序甚至VB.net中做到這一點,並希望使用Zend Framework來做到這一點。
說明:
觀點:
<div id="wrapper">
<a href="/Home">HomePage</a>
<div id="content"><?echo "@content_materials_index_Description"?></div>
</div>
messageResource.ini文件
content_materials_index_Description=Materials for production can be edited here. Click on the name of a material to edit it. The cross sign...
你並不清楚。你的問題到底是什麼?你有什麼嘗試?顯示一些代碼,你是如何失敗的? – markus
什麼是反對分離內容和觀點的climaCtic? – markus
我發現的是翻譯,但它更像是獲取整個文本塊。 –