本文整理汇总了PHP中CMSCategory::getSimpleCategories方法的典型用法代码示例。如果您正苦于以下问题:PHP CMSCategory::getSimpleCategories方法的具体用法?PHP CMSCategory::getSimpleCategories怎么用?PHP CMSCategory::getSimpleCategories使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMSCategory
的用法示例。
在下文中一共展示了CMSCategory::getSimpleCategories方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _displayForm
//.........这里部分代码省略.........
$parentCmsCategory = new CMSCategory((int) $parentTemp->id_cms_category, $this->context->cookie->id_lang);
$this->_html .= '<option value="' . $parentTemp->id . '">' . $parentTemp->id . ' - ' . $parentCmsCategory->name . '</option>';
} elseif ($parentTemp->id_product != 0) {
$parentProduct = new Product((int) $parentTemp->id_product, false, $this->context->cookie->id_lang);
$this->_html .= '<option value="' . $parentTemp->id . '">' . $parentTemp->id . ' - ' . $parentProduct->name . '</option>';
} else {
$this->_html .= '<option value="' . $parentTemp->id . '">' . $parentTemp->id . ' - ' . $parentTemp->title . '</option>';
}
}
$this->_html .= '
</select>
<p class="clear">' . $this->l('Choose a parent link for your link and a dropdown will appear in the nav bar for the parent') . '.</p>
</div>
</div>
</div>';
// category ou non
$this->_html .= '
<div class="step-3">
<h3 class="' . (isset($responsiveLink) ? 'hidden' : '') . '">' . $this->l('Step 3 : Choose your link type') . '.</h3>
<div class="option ' . (isset($responsiveLink) ? 'hidden' : '') . '">
<label for="iscategory">' . $this->l('Is a category link?') . '</label>
<div class="margin-form">
<input type="radio" name="iscategory" class="link-choice" value="1" ' . (isset($category) ? 'checked="checked"' : '') . '>
<label class="t"> <img src="../img/admin/enabled.gif" alt="' . $this->l('Yes') . '" title="' . $this->l('Yes') . '"></label>
<input type="radio" name="iscategory" class="link-choice" value="0" ' . (isset($category) ? '' : 'checked="checked"') . '>
<label class="t"> <img src="../img/admin/disabled.gif" alt="' . $this->l('No') . '" title="' . $this->l('No') . '"></label>
</div>
</div>
<div class="option-block ' . (isset($category) ? 'active' : '') . '">
<label for="category">' . $this->l('Choose your category page :') . '</label>
<div class="margin-form">
<select name="category" id="category" size="5">';
foreach (Category::getSimpleCategories($this->context->cookie->id_lang) as $categoryTemp) {
$this->_html .= '
<option value="' . $categoryTemp['id_category'] . '" ' . (isset($category) && $category->id == $categoryTemp['id_category'] ? 'selected="selected"' : '') . '>' . $categoryTemp['name'] . '</option>';
}
$this->_html .= '
</select>
</div>
</div>';
// cms ou non
$this->_html .= '
<div class="option ' . (isset($responsiveLink) ? 'hidden' : '') . '">
<label for="iscms">' . $this->l('Is a CMS link?') . '</label>
<div class="margin-form">
<input type="radio" name="iscms" class="link-choice" value="1" ' . (isset($cms) ? 'checked="checked"' : '') . '>
<label class="t"> <img src="../img/admin/enabled.gif" alt="' . $this->l('Yes') . '" title="' . $this->l('Yes') . '"></label>
<input type="radio" name="iscms" class="link-choice" value="0" ' . (isset($cms) ? '' : 'checked="checked"') . '>
<label class="t"> <img src="../img/admin/disabled.gif" alt="' . $this->l('No') . '" title="' . $this->l('No') . '"></label>
</div>
</div>
<div class="option-block ' . (isset($cms) ? 'active' : '') . '">
<label for="cms">' . $this->l('Choose your CMS page :') . '</label>
<div class="margin-form">
<select name="cms" id="cms" size="5">';
foreach (CMS::listCms($this->context->cookie->id_lang) as $cmsTemp) {
$this->_html .= '
<option value="' . $cmsTemp['id_cms'] . '" ' . (isset($cms) && $cms->id == $cmsTemp['id_cms'] ? 'selected="selected"' : '') . '>' . $cmsTemp['meta_title'] . '</option>';
}
$this->_html .= '
</select>
</div>
</div>';
// cms category or not