Jump to content


Photo
- - - - -

Анонс отделить от описания категории

анонс категория описание категорий перенести

3 replies to this topic

#1 Vseok999

Vseok999
  • JBZoo User (rus)
  • User rate: -0.1
  • posts: 19
  • topics: 7

Posted 02 March 2018 - 14:03

Здравствуйте. Мне необходимо было перенести текст описания категории под товары. Воспользовалься решением из этой темы http://forum.jbzoo.c...ие под товарами

 

Как мне теперь сделать так что бы анонс оставался в верху над товарами, а текст остался по прежнему внизу?


  • 0

#2 CB9TOIIIA

CB9TOIIIA
  • Administrators
  • User rate: 230.6
  • posts: 3680
  • topics: 235

Posted 04 March 2018 - 09:53

Только по API переверстывать и выводить нужный блок.

echo '<div class="description-full">'.$category->description.'</div>';

  • 0

#3 apirat

apirat
  • JBZoo User (rus)
  • User rate: 0
  • posts: 112
  • topics: 28

Posted 17 September 2018 - 13:11

Что бы вывести отдельно анонс используйте данный код в /jbuniversal/templates/bootstrap/category.php

echo $category->getText($category->params->get('content.category_teaser_text', ''));

вот весь файл

<?php
/**
 * JBZoo App is universal Joomla CCK, application for YooTheme Zoo component
 * @package     jbzoo
 * @version     2.x Pro
 * @author      JBZoo App http://jbzoo.com
 * @copyright   Copyright (C) JBZoo.com,  All rights reserved.
 * @license     http://jbzoo.com/license-pro.php JBZoo Licence
 * @coder       Denis Smetannikov <denis@jbzoo.com>
 */

// no direct access
defined('_JEXEC') or die('Restricted access');


$this->app->jbdebug->mark('template::category::start');

$this->app->jblayout->setView($this);
$currentView = $this->app->jbrequest->get('view', 'category');
$currentTask = $this->app->jbrequest->get('task', 'category');

if (isset($this->category)) {
    if ($currentView == 'frontpage' || $currentTask == 'frontpage') {
        $category = $this->application;
    } else {
        $category = $this->category;
    }
}

if (!$this->app->jbcache->start($this->params->get('config.lastmodified'))) {
    $this->app->jbwrapper->start();

    // category render
 //   if (isset($category)) {
  //      echo $this->app->jblayout->render($currentView, $category);
   // }
  echo '<h1 class="title">'.$category->name.'</h1>';
   
	// alphaindex render
    if ($this->params->get('template.show_alpha_index', 0)) {
        echo $this->app->jblayout->render('alphaindex', $this->alpha_index);
    }

	// teaser_text
echo $category->getText($category->params->get('content.category_teaser_text', ''));


    // subcategories render
    if (isset($category)) {
        $categories = $this->category->getChildren();
        if ($this->params->get('template.subcategory_show', 1) && count($categories)) {
            echo $this->app->jblayout->render('subcategories', $categories);
        }
    }

    // category items render
    if ($this->params->get('config.items_show', 1) && count($this->items)) {

        if (isset($category) && $this->params->get('config.show_feed_link', 1) && $currentView == 'category') {
            $link = $this->params->get('config.alternate_feed_link');
            if (!$link && isset($category->application_id)) {
                $link = $this->app->route->feed($category, 'rss');
                $link = JRoute::_($link);

                echo '<a class="rsslink" target="_blank" href="' . $link . '" title="' . JText::_('RSS feed') . '">' .
                    JText::_('RSS feed') . '</a>';

                echo JBZOO_CLR;
            }
        }

        echo $this->app->jblayout->render('items', $this->items);

    } else {
        echo $this->app->jblayout->render('items_empty', $category);
    }

	echo '<div class="description-full">'.$category->description.'</div>';

    // pagination render
    if ($this->params->get('template.item_pagination', 1)) {
        echo $this->app->jblayout->render('pagination', $this->pagination, array('link' => $this->pagination_link));
    }

    $this->app->jbwrapper->end();
    $this->app->jbcache->stop();
}

$this->app->jbdebug->mark('template::category::finish');

  • 0

#4 apirat

apirat
  • JBZoo User (rus)
  • User rate: 0
  • posts: 112
  • topics: 28

Posted 17 September 2018 - 15:47

с дивом 

// teaser_text

echo '<div class="anons">'.$category->getText($category->params->get('content.category_teaser_text', '')). '</div>';

  • 0





Also tagged with one or more of these keywords: анонс, категория, описание категорий перенести

Click to return to top of page in style!