我想獲得參數表單templateDetail.xml以在我的模板中使用它。但每次我做如何從joomla中的templateDetails.xml中獲取參數3.1
$this->params->get('Title', 'test');
我只得到測試,似乎他不能找到參數標題。
這是我templateDetail.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/2.5/template-install.dtd">
<extension version="3.0" type="template" client="site">
<name>Basic Joomla 3.0 Template</name>
<version>1.0</version>
<creationDate>10/04/2012</creationDate>
<author>Gazar</author>
<authorEmail>[email protected]</authorEmail>
<copyright>Copyright (C) 2013 Gazar</copyright>
<description>My first JOOMLA template!</description>
<files>
<filename>index.php</filename>
<folder>css</folder>
<folder>js</folder>
<folder>fonts</folder>
</files>
<positions>
<position>debug</position>
<position>hoofdmenu</position>
<position>slider</position>
<position>position-0</position>
<position>position-1</position>
<position>position-2</position>
<position>position-3</position>
<position>position-4</position>
<position>position-5</position>
<position>position-6</position>
<position>position-7</position>
<position>position-8</position>
<position>position-9</position>
<position>position-10</position>
<position>position-11</position>
<position>position-12</position>
<position>position-13</position>
<position>position-14</position>
</positions>
<config>
<fields name="params">
<field name="Title" type="text" default="Gazar" label="Title" description="Vul hier de titel van uw site in!" />
</fields>
</config>
</extension>
任何一個誰知道如何做到這一點?
PS:我必須告訴喬姆拉哪裏設置了參數嗎?或者JOOMLA知道他需要查看templateDetails.xml?
試試這個$這個 - > params-> GET( '標題') ; –
我得到NULL回來時,我這樣做 – apero
我認爲它的bcoz字段集標記缺少檢查 –