Ejemplo n.º 1
0
 public function metadata()
 {
     $option = MRequest::getCmd('option');
     if ($option != 'com_' . $this->context) {
         return;
     }
     if (defined('MIWI_IS_ITEM')) {
         return;
     }
     $document = MFactory::getDocument();
     $metadata = array();
     if ($meta_desc = $document->getMetadata('description')) {
         $metadata[] = '<meta name="description" content="' . $meta_desc . '" />';
     }
     if ($meta_keywords = $document->getMetadata('keywords')) {
         $metadata[] = '<meta name="keywords" content="' . $meta_keywords . '" />';
     }
     if ($meta_author = $document->getMetadata('author')) {
         $metadata[] = '<meta name="author" content="' . $meta_author . '" />';
     }
     $base = MFactory::getUri()->base();
     $metadata[] = '<base  href="' . $base . '" />';
     echo implode("\n", $metadata);
 }
Ejemplo n.º 2
0
 public static function getActiveUrl()
 {
     return self::cleanUrl(MFactory::getUri()->toString());
 }