Перейти к содержимому


Фотография
- - - - -

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

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

Сообщений в теме: 3

#1 Vseok999

Vseok999

Отправлено 02 March 2018 - 14:03

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

 

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


  • 0

#2 CB9TOIIIA

CB9TOIIIA

Отправлено 04 March 2018 - 09:53

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

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

  • 0

#3 apirat

apirat

Отправлено 17 September 2018 - 13:11

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

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

вот весь файл

  1. <?php
  2. /**
  3. * JBZoo App is universal Joomla CCK, application for YooTheme Zoo component
  4. * @package jbzoo
  5. * @version 2.x Pro
  6. * @author JBZoo App http://jbzoo.com
  7. * @copyright Copyright (C) JBZoo.com, All rights reserved.
  8. * @license http://jbzoo.com/license-pro.php JBZoo Licence
  9. * @coder Denis Smetannikov <denis@jbzoo.com>
  10. */
  11.  
  12. // no direct access
  13. defined('_JEXEC') or die('Restricted access');
  14.  
  15.  
  16. $this->app->jbdebug->mark('template::category::start');
  17.  
  18. $this->app->jblayout->setView($this);
  19. $currentView = $this->app->jbrequest->get('view', 'category');
  20. $currentTask = $this->app->jbrequest->get('task', 'category');
  21.  
  22. if (isset($this->category)) {
  23. if ($currentView == 'frontpage' || $currentTask == 'frontpage') {
  24. $category = $this->application;
  25. } else {
  26. $category = $this->category;
  27. }
  28. }
  29.  
  30. if (!$this->app->jbcache->start($this->params->get('config.lastmodified'))) {
  31. $this->app->jbwrapper->start();
  32.  
  33. // category render
  34. // if (isset($category)) {
  35. // echo $this->app->jblayout->render($currentView, $category);
  36. // }
  37. echo '<h1 class="title">'.$category->name.'</h1>';
  38. // alphaindex render
  39. if ($this->params->get('template.show_alpha_index', 0)) {
  40. echo $this->app->jblayout->render('alphaindex', $this->alpha_index);
  41. }
  42.  
  43. // teaser_text
  44. echo $category->getText($category->params->get('content.category_teaser_text', ''));
  45.  
  46.  
  47. // subcategories render
  48. if (isset($category)) {
  49. $categories = $this->category->getChildren();
  50. if ($this->params->get('template.subcategory_show', 1) && count($categories)) {
  51. echo $this->app->jblayout->render('subcategories', $categories);
  52. }
  53. }
  54.  
  55. // category items render
  56. if ($this->params->get('config.items_show', 1) && count($this->items)) {
  57.  
  58. if (isset($category) && $this->params->get('config.show_feed_link', 1) && $currentView == 'category') {
  59. $link = $this->params->get('config.alternate_feed_link');
  60. if (!$link && isset($category->application_id)) {
  61. $link = $this->app->route->feed($category, 'rss');
  62. $link = JRoute::_($link);
  63.  
  64. echo '<a class="rsslink" target="_blank" href="' . $link . '" title="' . JText::_('RSS feed') . '">' .
  65. JText::_('RSS feed') . '</a>';
  66.  
  67. echo JBZOO_CLR;
  68. }
  69. }
  70.  
  71. echo $this->app->jblayout->render('items', $this->items);
  72.  
  73. } else {
  74. echo $this->app->jblayout->render('items_empty', $category);
  75. }
  76.  
  77. echo '<div class="description-full">'.$category->description.'</div>';
  78.  
  79. // pagination render
  80. if ($this->params->get('template.item_pagination', 1)) {
  81. echo $this->app->jblayout->render('pagination', $this->pagination, array('link' => $this->pagination_link));
  82. }
  83.  
  84. $this->app->jbwrapper->end();
  85. $this->app->jbcache->stop();
  86. }
  87.  
  88. $this->app->jbdebug->mark('template::category::finish');

  • 0

#4 apirat

apirat

Отправлено 17 September 2018 - 15:47

с дивом 

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

  • 0





Темы с аналогичным тегами анонс, категория, описание категорий перенести

Click to return to top of page in style!