joomla3.0 - Joomla 3.3.6 Category Blog - Subcategories before articles -



joomla3.0 - Joomla 3.3.6 Category Blog - Subcategories before articles -

i trying customise category blog layout 1 category follows:

this special category (id 24) blog layout should display list of subcategories before articles the other categories stick default layout: articles first , subcategories

i tried overriding blog.php:

<div class="blog<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="http://schema.org/blog"> <!-- special category - subcategories first --> <?php if ($this->category->id == 24 && !empty($this->children[$this->category->id]) && $this->maxlevel != 0) : ?> <div class="cat-children"> <?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?> <h3> <?php echo jtext::_('jglobal_subcategories'); ?> </h3> <?php endif; ?> <?php echo $this->loadtemplate('children'); ?> </div> <?php endif; ?> <?php $introcount = (count($this->intro_items)); $counter = 0; ?> <?php if (!empty($this->intro_items)) : ?> <?php foreach ($this->intro_items $key => &$item) : ?> <?php $rowcount = ((int) $key % (int) $this->columns) + 1; ?> <?php if ($rowcount == 1) : ?> <?php $row = $counter / $this->columns; ?> <div class="items-row cols-<?php echo (int) $this->columns; ?> <?php echo 'row-' . $row; ?> row-fluid clearfix"> <?php endif; ?> <div class="span<?php echo round((12 / $this->columns)); ?>"> <div class="item column-<?php echo $rowcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>" itemprop="blogpost" itemscope itemtype="http://schema.org/blogposting"> <?php $this->item = & $item; echo $this->loadtemplate('item'); ?> </div> <!-- end item --> <?php $counter++; ?> </div><!-- end span --> <?php if (($rowcount == $this->columns) or ($counter == $introcount)) : ?> </div><!-- end row --> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <?php if (!empty($this->link_items)) : ?> <div class="items-more"> <?php echo $this->loadtemplate('links'); ?> </div> <?php endif; ?> <!-- other categories - subcategories lastly --> <?php if (!empty($this->children[$this->category->id]) && $this->maxlevel != 0 && $this->category->id != 24) : ?> <div class="cat-children"> <?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?> <h3> <?php echo jtext::_('jglobal_subcategories'); ?> </h3> <?php endif; ?> <?php echo $this->loadtemplate('children'); ?> </div> <?php endif; ?> <?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 1)) : ?> <div class="pagination"> <?php if ($this->params->def('show_pagination_results', 1)) : ?> <p class="counter pull-right"> <?php echo $this->pagination->getpagescounter(); ?> </p> <?php endif; ?> <?php echo $this->pagination->getpageslinks(); ?> </div> <?php endif; ?>

it displays fine other categories, when trying view special one, this:

{category title} {description} notice: undefined property: contentviewcategory::$item in {joomla}\templates\wse\html\com_content\category\blog_children.php on line 63 notice: undefined property: contentviewcategory::$item in {joomla}\templates\wse\html\com_content\category\blog_children.php on line 63 notice: trying property of non-object in {joomla}\templates\wse\html\com_content\category\blog_children.php on line 63 fatal error: phone call fellow member function get() on non-object in {joomla}\layouts\joomla\content\readmore.php on line 17

sooo must missing :) please help? many thanks.

use debug code link seems me complaining $item on line 63 of blog_children. utilize link provided before check valid properties of contentviewcategory class

joomla joomla3.0

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -