本文整理汇总了PHP中Builder::set_title方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::set_title方法的具体用法?PHP Builder::set_title怎么用?PHP Builder::set_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Builder
的用法示例。
在下文中一共展示了Builder::set_title方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sitemap
public function sitemap()
{
Builder::add_meta('robots', 'noindex', TRUE);
Builder::add_css('pages/frontend-sitemap');
Builder::set_title(get_string('pages', 'sitemap_title'));
$nav = array();
$nav[get_string('url_naming', 'home')] = '';
$nav[get_string('url_naming', 'sitemap')] = 'special/sitemap';
$page = array();
$page['nav'] =& $nav;
$page['content'] = $this->view('frontend/sitemap', array(), TRUE);
$this->view('frontend/frontend', $page);
}
示例2: about
public function about()
{
Builder::set_title(get_string('pages', 'about_title'));
Builder::add_meta('robots', 'none', TRUE);
$nav = array();
$nav[get_string('url_naming', 'home')] = '';
$nav[get_string('url_naming', 'about')] = 'home/about';
//------------------Total page------------
$path = get_article_path('about');
$page = array();
$page['nav'] =& $nav;
$page['content'] = $this->view($path, array(), TRUE);
$this->view('frontend/frontend', $page);
}
示例3: read
public function read($opt = NULL)
{
Builder::add_plugin('jQuery-slimScroll');
Builder::add_js('system/wx');
Builder::add_css('pages/frontend-article');
Builder::add_css(array('pages/home-about', 'system/github'));
$article_id = reset($opt);
if (empty($article_id)) {
throw new Exception_wx(4040004, $article_id);
}
$article_meta = $this->model('articles_model')->get($article_id);
$content['id'] = $article_id;
$content['type'] =& $article_meta['type'];
$content['header'] =& $article_meta['header'];
$content['creation'] =& $article_meta['creation'];
Builder::set_title(get_string('url_naming', $article_meta['type']) . ' — ' . $article_meta['header']);
$left['list'] = $this->model('articles_model')->get_articles_by_type($content['type']);
$left['current'] = base_url("articles/read/{$article_id}");
$content['previous'] = NULL;
$content['following'] = NULL;
$index = 0;
foreach ($left['list'] as $key => &$item) {
if ($left['current'] == $item['link']) {
$index = $key;
break;
}
}
if ($index > 0) {
$content['previous'] =& $left['list'][$index - 1]['link'];
}
if ($index < count($left['list']) - 1) {
$content['following'] =& $left['list'][$index + 1]['link'];
}
if (isset($article_meta['description'])) {
Builder::add_meta('description', $article_meta['description']);
}
if (isset($article_meta['keywords'])) {
Builder::add_meta('keywords', $article_meta['keywords']);
}
$page = array();
$page['content'] = $this->view('article_read', $content, TRUE);
$this->view('frontend/frontend', $page);
}