php - Joomla: access article properties from tags module -


so i've got template, , design blog used blog.php , blog_items.php in html/ folder in template's folder. working on tag-search, that's not in com_content, it's in com_tags. created folder com_tags, tag folder inside and, since want posts same in tag search , common blog view, copied blog_item.php new folder, renaming default_item. have no problem including file default_items.php, $this->item seems different 1 in com_content component. so, code, when using lines <?php echo jlayouthelper::render('joomla.content.blog_style_default_item_title', $this->item); ?>

generates lot of errors, that, example, $this->item->title unset. i've created simple workaround after investigation using print_r:

$params = jcomponenthelper::getparams('com_content'); $this->params=$params; $this->item->params=$params; $this->item->title=$this->escape($this->item->core_title); $this->item->state=$this->escape($this->item->core_state); $this->item->publish_up=$this->escape($this->item->core_publish_up); $this->item->publish_down=$this->escape($this->item->core_publish_down); $this->item->images=$this->escape($this->item->core_images); $this->item->introtext = $this->item->text; 

but such workaround won't let me get, example, hits of article, since there no core_hits variable , code looks stupid. how should correctly?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -