本文整理汇总了PHP中Model_Content::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Content::where方法的具体用法?PHP Model_Content::where怎么用?PHP Model_Content::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_Content
的用法示例。
在下文中一共展示了Model_Content::where方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_search
public function action_search($search = NULL)
{
//template header
$this->template->title = __(' Frequently Asked Questions - FAQ');
$this->template->meta_description = core::config('general.site_name') . ' ' . __('frequently asked questions.');
$this->template->styles = array('css/faq.css' => 'screen');
$this->template->scripts['footer'] = array('js/faq.js');
//FAQ CMS
$faqs = new Model_Content();
$faqs->where('type', '=', 'help')->where('status', '=', '1');
if ($search !== NULL) {
$faqs->where_open()->where('title', 'like', '%' . $search . '%')->or_where('description', 'like', '%' . $search . '%')->where_close();
}
$faqs = $faqs->order_by('order', 'asc')->find_all();
$this->template->bind('content', $content);
if (strlen(core::config('general.faq_disqus')) > 0) {
$disqus = View::factory('pages/disqus', array('disqus' => core::config('general.faq_disqus')));
} else {
$disqus = '';
}
$this->template->content = View::factory('pages/faq/listing', array('faqs' => $faqs, 'disqus' => $disqus));
}