2014-10-16 3 views
0

I는 다음과 같이 하나의 범주에 대한 카테고리 블로그 레이아웃을 사용자 정의하려고 :줌라 3.3.6 카테고리 블로그 - 기사 전에 하위 카테고리

  • 이 특별한 범주 (ID 24) 블로그 레이아웃은 의 목록을 표시해야 첫 번째 기사를 다음 하위 범주

내가 무시 시도 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 as $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 LAST --> 
    <?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; ?> 
    

    그것은 다른 카테고리에 잘 표시하지만 특별한 일을 보려고 할 때, 나는이 얻을 : 사람이 도움을 주시기 바랍니다 수 :

    {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 to get property of non-object in {joomla}\templates\wse\html\com_content\category\blog_children.php on line 63 
    
    Fatal error: Call to a member function get() on a non-object in {joomla}\layouts\joomla\content\readmore.php on line 17 
    

    SOOO 내가 실종해야 뭔가를 ? 많은 감사.

  • 답변

    0

    코드를 디버그하십시오. link blog_children의 63 행에 $ item에 대한 불만이있는 것 같습니다. 앞에서 제공된 링크를 사용하여 ContentViewCategory 클래스의 모든 유효한 속성을 확인하십시오.

    관련 문제