Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class PageControllerExtension extends Extension {
- public function onBeforeInit() {
- /* =========================================
- * SEO
- =========================================*/
- $tags = '';
- if(!$this->owner->MetaDescription && $metaDescription = SiteConfig::current_site_config()->MetaDescription) {
- $tags .= "<meta name=\"description\" content=\"" . Convert::raw2att($metaDescription) . "\" />\n";
- }
- $this->owner->extend('MetaTags', $tags);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement