* @param int $columnCount カラム部(intro部)のカラム数
* @param string $categoryDesc カテゴリーの説明
* @param string $readMoreTitle 「もっと読む」ボタンのタイトル(ウィジェットでのデフォルト値)
+ * @param bool $withDefaultOutput ウィジェットデフォルト描画出力をカテゴリー説明部に出力するかどうか
* @return なし
*/
- function setJoomlaViewData($viewItemsData, $leadContentCount, $columnContentCount, $columnCount, $categoryDesc = '', $readMoreTitle = '')
+ function setJoomlaViewData($viewItemsData, $leadContentCount, $columnContentCount, $columnCount, $categoryDesc = '', $readMoreTitle = '', $withDefaultOutput = false)
{
// Joomla!新型テンプレートでない場合は終了
if ($this->_renderType != M3_RENDER_JOOMLA_NEW) return;
$viewData['columnCount'] = $columnCount; // カラム部(intro部)のカラム数
$viewData['categoryDesc'] = $categoryDesc; // カテゴリーの説明
$viewData['readMoreTitle'] = $readMoreTitle; // 「もっと読む」ボタンタイトル
+ if ($withDefaultOutput) $viewData['withDefaultOutput'] = true; // ウィジェット出力をカテゴリー説明部に出力するかどうか
$this->gEnv->setJoomlaViewData($viewData);
}
/**
public function getModuleContents($style, $content, $title = '', $attribs = array(), $paramsOther = array(), $pageDefParam = array(), $templateVer = 0)
{
global $gEnvManager;
-
+
// 必要なスクリプトを読み込む
$templateId = empty($this->templateId) ? $gEnvManager->getCurrentTemplateId() : $this->templateId;
$path = $gEnvManager->getTemplatesPath() . '/' . $templateId . '/html/modules.php'; // テンプレート独自の変換処理
$this->_addHook('loadtemplate.start', array($this, '_loadtemplateStartHook'));
// ### カテゴリーの情報 ###
+ // カテゴリー説明を優先
$categoryDesc = $viewData['categoryDesc'];
- if (!empty(Description)){
+ if (!empty($categoryDesc)){
// カテゴリーの説明
$this->category = new stdClass;
$this->category->description = $categoryDesc;
$this->params->set('show_description', 1);
+ } else if ($viewData['withDefaultOutput']){ // ウィジェット出力をカテゴリー説明部に出力する場合
+ // カテゴリーの説明
+ $this->category = new stdClass;
+ $this->category->description = $content;
+ $this->params->set('show_description', 1);
}
// カテゴリータイトル(サブタイトル)
//$this->params->set('show_category_title', 1);