本文整理汇总了PHP中MG::seoMeta方法的典型用法代码示例。如果您正苦于以下问题:PHP MG::seoMeta方法的具体用法?PHP MG::seoMeta怎么用?PHP MG::seoMeta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MG
的用法示例。
在下文中一共展示了MG::seoMeta方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mgSEO
/**
* Устанавливает meta данные страницы title, description, keywords.
* @param string|bool $title заголовок страницы.
* @return void.
*/
function mgSEO($data)
{
MG::seoMeta($data);
}
示例2: printNews
public static function printNews($arg)
{
$aUri = URL::getSections();
$result = $arg['result'];
if ($aUri[1] == 'news' && empty($aUri[2])) {
MG::titlePage('Новости');
$listNews = self::getListNews(MG::getOption('countPrintRowsNews'));
$result = '
<div class="page-content">
<ul class="breadcrumbs bor-b">
<li><a href="' . SITE . '" class="home">Главная</a></li>
<span> / </span>
<li>Новости</li>
</ul><!-- !ul.breadcrumbs -->
<h1 class="title-page">Новости</h1>';
if (!empty($listNews['listNews'])) {
foreach ($listNews['listNews'] as $news) {
$result .= '
<div class="news-blocks-main">
<div class="title-news-main">
<a href="news/' . $news['url'] . '">' . ucfirst($news['title']) . '</a>
</div>
<div class="white-box bor-b clearfix">
<img src="' . SITE . '/uploads/news/' . $news['image_url'] . '" alt="' . $news['title'] . '" title="' . $news['title'] . '">
' . mb_substr(strip_tags(PM::stripShortcodes($news['description'])), 0, 140, 'utf-8') . '
</div><!-- !div.white-box -->
</div><!-- !div.news-blocks-main -->
';
}
$result .= "{$listNews['pagination']}";
} else {
$result .= '<div class="white-box bor-b">Новости не найдены</div><!-- !div.page-content-box -->';
}
$result .= '</div><!-- !div.page-content -->';
} else {
if (URL::isSection('news')) {
$news = self::getNewsByUrl(URL::getLastSection());
if (empty($news)) {
MG::redirect('/404.html');
}
MG::titlePage($news['title']);
MG::seoMeta($news);
$body = MG::inlineEditor('mpl_news', 'description', $news['id'], $news['description']);
$result = '
<div class="page-content">
<ul class="breadcrumbs bor-b">
<li><a href="' . SITE . '" class="home">Главная</a></li>
<span> / </span>
<li><a href="' . SITE . '/news' . '">Новости</a></li>
<span> / </span>
<li>' . $news['title'] . '</li>
</ul><!-- !ul.breadcrumbs -->
<h1 class="title-page">' . $news['title'] . '</h1>
<div class="white-box bor-b">
' . $body . '
</div><!-- !div.page-content-box -->
<div class="clearfix static-comments-btn">
<div class="left">
<p>Комментарии:</p>
</div>
<div class="right">
<a href="#" class="add-cmt jq-add-cmt-static-page">Добавить комментарий</a>
</div>
</div><!-- !div.clearfix -->
[comments]
</div><!-- !div.page-content -->';
}
}
return $result;
}