5年以上経過した古い記事です(Joomla2.5)
Joomla!YOOThemeのモジュールポジションを増やす

YOOTheme のModule Positionsですが、時には「TOP A」と「TOP B」だけでは足りなくなり「TOP C」が有れば?と必要になる事も有ると思います。その時は下記の5っのファイルを修正するだけで、モジュールポジションを増やすことが簡単に出来ます。
- templateDetails.xml (Joomla)
- config.xml
- /layouts/template.php
- /layouts/module.php
- /js/template.js
Themeファイルを直接変更した場合はYooThemeのアップデートが効かなくなる場合があります。必ずバックアップをして、自己責任で作業を行なってください。(変更前のプレーンの状況をバックアップするこ事をお薦め致します。)
■templateDetails.xml
<position>top-c</position>を追記
//記載例
<positions>
...
<position>top-a</position>
<position>top-b</position>
<position>top-c</position>
<position>bottom-a</position>
...
</positions>
■config.xml
「Top b」のコードをコピーして「Top c」を追記する
<field name="top-c" type="layout" default="equal" label="Top C Layout" description="Select a grid layout for this module position." />
■layouts/template.php
「Top b」のコードをコピーして「Top c」を追記する
<section id="top-c">
<div class="grid-block">
<?php echo $this['modules']->render('top-c', array('layout'=>$this['config']->get('top-c'))); ?>
</div>
</section>
<?php endif; ?>
■layouts/module.php
「Top b」のコードをコピーして「Top c」を追記する
// set default module types
if ($style == '') {
if ($module->position == 'top-a') $style = 'line';
if ($module->position == 'top-b') $style = 'line';
if ($module->position == 'top-c') $style = 'line';
...
}
■js/template.js
「Top b」のコードをコピーして「Top c」を追記する
$('#top-c .grid-h').matchHeight('.deepest');
■テンプレート管理: スタイルの編集画面
