diff --git a/components/com_jcar/site/views/item/tmpl/default.php b/components/com_jcar/site/views/item/tmpl/default.php index 625e9a5..88eb4f5 100644 --- a/components/com_jcar/site/views/item/tmpl/default.php +++ b/components/com_jcar/site/views/item/tmpl/default.php @@ -8,6 +8,14 @@ */ defined('_JEXEC') or die; +use \Joomla\Utilities\ArrayHelper; + +JFactory::getDocument() + ->setMetaData("DC.title", reset(ArrayHelper::getValue($this->item->metadata, "dc.title"))) + ->setMetaData("DC.author", reset(ArrayHelper::getValue($this->item->metadata, "dc.contributor.author"))) + ->setMetaData("DC.issued", reset(ArrayHelper::getValue($this->item->metadata, "dc.date.issued"))) + ->setMetaData("DC.publisher", reset(ArrayHelper::getValue($this->item->metadata, "dc.publisher"))); + JLoader::register( 'JCarHelper', JPATH_ROOT.'/administrator/components/com_jcar/helpers/jcar.php'); diff --git a/components/com_jcar/site/views/item/view.html.php b/components/com_jcar/site/views/item/view.html.php index e204b45..59cb645 100644 --- a/components/com_jcar/site/views/item/view.html.php +++ b/components/com_jcar/site/views/item/view.html.php @@ -29,7 +29,7 @@ public function display($tpl = null) $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->params = $this->state->get('params'); - + parent::display($tpl); } }