За последние 24 часа нас посетили 66672 программиста и 6764 робота. Сейчас ищут 2488 программистов ...

Вставить в php свой DIV

Тема в разделе "PHP для новичков", создана пользователем ziz6ka, 11 апр 2018.

  1. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    Здравствуйте

    Помоги плиз. Бьюсь уже 2 день
    Сайт на Joomla

    Снимок экрана 2018-04-11 в 15.36.53.png
    Моя задача засунуть $article в отдельный DIV в колонках блока
    12322.png

    не могу понять что и куда прописать(((

    помогиииите((((

    PHP:
    1. <?php
    2. /**
    3. * @package   Warp Theme Framework
    4. * @author    YOOtheme http://www.yootheme.com
    5. * @copyright Copyright (C) YOOtheme GmbH
    6. * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
    7. */
    8.  
    9. // no direct access
    10. defined('_JEXEC') or die;
    11.  
    12. JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
    13.  
    14.  
    15. ?>
    16.  
    17. <?php
    18. $app = JFactory::getApplication();
    19. $app->input->set('layout', 'blog');
    20. ?>
    21.  
    22. <?php if ($this->params->get('show_page_heading') || $this->params->get('page_subheading') || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1) || $this->params->get('show_category_title', 1)) : ?>
    23. <div class="uk-grid">
    24.     <div class="uk-width-1-1">
    25.         <div class="uk-panel uk-panel-header">
    26.  
    27.             <?php if ($this->params->get('show_page_heading')) : ?>
    28.             <h1 class="tm-title"><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
    29.             <?php endif; ?>
    30.  
    31.             <?php if ($this->params->get('page_subheading')) : ?>
    32.             <h2><?php echo $this->escape($this->params->get('page_subheading')); ?></h2>
    33.             <?php endif; ?>
    34.  
    35.             <?php if ($this->params->get('show_category_title', 1)) : ?>
    36.             <h3 class="uk-h3"><?php echo $this->category->title;?></h3>
    37.             <?php endif; ?>
    38.  
    39.             <?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) :?>
    40.             <div class="uk-clearfix">
    41.  
    42.                 <?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
    43.                     <img src="<?php echo $this->category->getParams()->get('image'); ?>" alt="<?php echo $this->category->getParams()->get('image'); ?>" class="uk-align-right">
    44.                 <?php endif; ?>
    45.  
    46.                 <?php if ($this->params->get('show_description') && $this->category->description) echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
    47.  
    48.                 <?php
    49.  
    50.                     if ($this->params->get('show_tags', 1) && !empty($this->category->tags->itemTags)) {
    51.                         JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php');
    52.                         echo '<p>'.JText::_('TPL_WARP_TAGS').': ';
    53.                         foreach ($this->category->tags->itemTags as $i => $tag) {
    54.                             if (in_array($tag->access, JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')))) {
    55.                                 if($i > 0) echo ', ';
    56.                                 echo '<a href="'.JRoute::_(TagsHelperRoute::getTagRoute($tag->tag_id . ':' . $tag->alias)).'">'.$this->escape($tag->title).'</a>';
    57.                             }
    58.                         }
    59.                         echo '</p>';
    60.                     }
    61.  
    62.                 ?>
    63.             </div>
    64.             <?php endif; ?>
    65.  
    66.         </div>
    67.     </div>
    68. </div>
    69. <?php endif; ?>
    70.  
    71. <?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
    72.     <?php if ($this->params->get('show_no_articles', 1)) : ?>
    73.         <div class="uk-alert"><?php echo JText::_('COM_CONTENT_NO_ARTICLES'); ?></div>
    74.     <?php endif; ?>
    75. <?php endif; ?>
    76.  
    77. <?php
    78.  
    79. // init vars
    80. $articles = '';
    81.  
    82. // leading articles
    83. if (!empty($this->lead_items)) {
    84.     $articles  .= '<div class="uk-grid tm-leading-article"><div class="uk-width-1-1"><div class="block">';
    85.     foreach ($this->lead_items as $item) {
    86.         $this->item = $item;
    87.         $articles  .= $this->loadTemplate('item');
    88.  
    89.     }
    90.     $articles  .= '</div></div></div>';
    91. }
    92.  
    93. // intro articles
    94. $num_columns = $this->params->get('num_columns', 2);
    95. $columns      = array();
    96. $i = 0;
    97.  
    98. foreach ($this->intro_items as $item) {
    99.     $column = $i++ % $num_columns;
    100.  
    101.     if (!isset($columns[$column])) {
    102.         $columns[$column] = '';
    103.     }
    104.  
    105.     $this->item = $item;
    106.     $this->item->is_column_item = ($num_columns > 1);
    107.     $columns[$column] .= $this->loadTemplate('item');
    108. }
    109.  
    110. // render intro columns
    111. if ($count = count($columns)) {
    112.     $articles  .= '<div class="uk-grid" data-uk-grid-match data-uk-grid-margin>';
    113.     for ($i = 0; $i < $count; $i++) {
    114.         $articles .= '<div class="uk-width-medium-1-'.$count.'">'.$columns[$i].'</div>';
    115.     }
    116.     $articles  .= '</div>';
    117. }
    118.  
    119. if ($articles) echo $articles;
    120.  
    121. ?>
    122.  
    123. <?php if (!empty($this->link_items)) : ?>
    124. <div class="uk-grid">
    125.     <div class="uk-width-1-1">
    126.         <div class="uk-panel uk-panel-header">
    127.             <h3 class="uk-panel-title"><?php echo JText::_('COM_CONTENT_MORE_ARTICLES'); ?></h3>
    128.             <ul class="uk-list">
    129.                 <?php foreach ($this->link_items as &$item) : ?>
    130.                 <li><a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid)); ?>"><?php echo $item->title; ?></a></li>
    131.                 <?php endforeach; ?>
    132.             </ul>
    133.         </div>
    134.     </div>
    135. </div>
    136. <?php endif; ?>
    137.  
    138. <?php if (($this->params->def('show_pagination', 1) == 1  || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 1)) : ?>
    139. <?php echo $this->pagination->getPagesLinks(); ?>
    140. <?php endif; ?>
     
    #1 ziz6ka, 11 апр 2018
    Последнее редактирование: 11 апр 2018
  2. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    неужели никто не поможет?(((
     
  3. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
    $this->item=$item;
    $this->item="<div>".$item."</div>";
     
  4. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    Catchable fatal error: Object of class stdClass could not be converted to string in /var/www/vhosts/u0382878.plsk.regruhosting.ru/httpdocs/dentikviks.ru/templates/jp-gusto/warp/systems/joomla/layouts/com_content/category/blog.phpon line 105
     
  5. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
    беспридел) тогда так

    $articles.='<div class="uk-width-medium-1-'.$count.'">-----див-----'.$columns[$i].'------/див---</div>';
     
  6. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    может я не в той строчке ставлю?
     
  7. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
    пробуй второй вариант. Должно заработать
     
  8. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    $articles.='<div class="uk-width-medium-1-'.$count.'">-----див-----'.$columns[$i].'------/див---</div>';
    вот так я делала. так получается НО он заводит в блок ВСЮ колонку/ А мне надо только итем! (артикля)
     
  9. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
    Ну значит вся магия в другом файле $this->loadTemplate('item');
     
  10. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    не может быть в нем((
    это файл вывода блока..... тут и надо править ВИД блока
    а $this->loadTemplate('item'); это мол сам итем там оттуда его тащить
    но в том виде который написан в этом файле
    я не сильна в пхп(((
    не могу врубиться ГДЕ он запрашивает вывод итема именно в колонке
    --- Добавлено ---
    PHP:
    1. // intro articles
    2. $num_columns = $this->params->get('num_columns', 2);
    3. $columns      = array();
    4. $i = 0;
    5.  
    6. foreach ($this->intro_items as $item) {
    7.     $column = $i++ % $num_columns;
    8.  
    9.     if (!isset($columns[$column])) {
    10.         $columns[$column] = '';
    11.     }
    12.  
    13.     $this->item=$item;
    14.  
    15.     $this->item->is_column_item = ($num_columns > 1);
    16.  
    17.     $columns[$column] .= $this->loadTemplate('item');
    18. }
    я так понимаю вот он говорит что в колонке брать итем..... вот как взять его в ДИВЕ?(((((
     
  11. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    ребят ну помоги(( ну очень надо(((
    если надо то вот loadTemplate('item');
    PHP:
    1. <?php
    2. /**
    3. * @package   Warp Theme Framework
    4. * @author    YOOtheme http://www.yootheme.com
    5. * @copyright Copyright (C) YOOtheme GmbH
    6. * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
    7. */
    8.  
    9. // no direct access
    10. defined('_JEXEC') or die;
    11.  
    12. // Create a shortcut for params.
    13. $item      = $this->item;
    14. $params  = $item->params;
    15. $canEdit = $this->item->params->get('access-edit');
    16. $args    = include(__DIR__.'/../article_defaults.php');
    17. JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
    18.  
    19. // template args
    20. $args = array_merge($args, array(
    21.     'image' => isset($images->image_intro) ? htmlspecialchars($images->image_intro) : '',
    22.     'image_alignment' => !isset($images->float_intro) || empty($images->float_intro) ? htmlspecialchars($params->get('float_intro')) : htmlspecialchars($images->float_intro),
    23.     'image_alt' => isset($images->image_intro_alt) ? htmlspecialchars($images->image_intro_alt) : '',
    24.     'image_caption' => isset($images->image_intro_caption) ? htmlspecialchars($images->image_intro_caption) : '',
    25.     'article' => $this->item->introtext,
    26.     'is_column_item' => (isset($this->item->is_column_item)) ? $this->item->is_column_item : 0
    27. ));
    28.  
    29.  
    30. // set edit
    31. $args['edit']  = $canEdit ? JHtml::_('icon.edit', $this->item, $params) : '';
    32. $args['edit'] .= $params->get('show_print_icon') ? JHtml::_('icon.print_popup', $this->item, $params) : '';
    33. $args['edit'] .= $params->get('show_email_icon') ? JHtml::_('icon.email', $this->item, $params) : '';
    34.  
    35. // set url
    36. if ($params->get('access-view')) {
    37.     $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
    38. } else {
    39.     $menu = JFactory::getApplication()->getMenu();
    40.     $active = $menu->getActive();
    41.     $itemId = $active->id;
    42.     $link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
    43.     $returnURL = ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid);
    44.     $link = new JURI($link1);
    45.     $link->setVar('return', base64_encode($returnURL));
    46. }
    47. $args['url'] = $link;
    48.  
    49. // set more
    50. if ($params->get('show_readmore') && $this->item->readmore) {
    51.     if (!$params->get('access-view')) {
    52.         $args['more'] = JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
    53.     } elseif ($readmore = $this->item->alternative_readmore) {
    54.         $args['more'] = $readmore;
    55.     } else {
    56.         $args['more'] = JText::_('TPL_WARP_CONTINUE_READING');
    57.     }
    58. }
    59.  
    60. // render template
    61. echo $warp['template']->render('article', $args);
     
  12. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
  13. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    к сожалению это мне не поможет, как ПОМЕНЯТЬ див я уже научилась.

    как ПРОПИСАТЬ новый див

    я врубилась что править надо этот файл

    PHP:
    1. <?php
    2. /**
    3. * @package   Warp Theme Framework
    4. * @author    YOOtheme http://www.yootheme.com
    5. * @copyright Copyright (C) YOOtheme GmbH
    6. * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
    7. */
    8. // no direct access
    9. defined('_JEXEC') or die;
    10. // Create a shortcut for params.
    11. $item      = $this->item;
    12. $params  = $item->params;
    13. $canEdit = $this->item->params->get('access-edit');
    14. $args    = include(__DIR__.'/../article_defaults.php');
    15. JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
    16. // template args
    17. $args = array_merge($args, array(
    18.     'image' => isset($images->image_intro) ? htmlspecialchars($images->image_intro) : '',
    19.     'image_alignment' => !isset($images->float_intro) || empty($images->float_intro) ? htmlspecialchars($params->get('float_intro')) : htmlspecialchars($images->float_intro),
    20.     'image_alt' => isset($images->image_intro_alt) ? htmlspecialchars($images->image_intro_alt) : '',
    21.     'image_caption' => isset($images->image_intro_caption) ? htmlspecialchars($images->image_intro_caption) : '',
    22.     'article' => $this->item->introtext,
    23.     'is_column_item' => (isset($this->item->is_column_item)) ? $this->item->is_column_item : 0
    24. ));
    25. // set edit
    26. $args['edit']  = $canEdit ? JHtml::_('icon.edit', $this->item, $params) : '';
    27. $args['edit'] .= $params->get('show_print_icon') ? JHtml::_('icon.print_popup', $this->item, $params) : '';
    28. $args['edit'] .= $params->get('show_email_icon') ? JHtml::_('icon.email', $this->item, $params) : '';
    29. // set url
    30. if ($params->get('access-view')) {
    31.     $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
    32. } else {
    33.     $menu = JFactory::getApplication()->getMenu();
    34.     $active = $menu->getActive();
    35.     $itemId = $active->id;
    36.     $link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
    37.     $returnURL = ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid);
    38.     $link = new JURI($link1);
    39.     $link->setVar('return', base64_encode($returnURL));
    40. }
    41. $args['url'] = $link;
    42. // set more
    43. if ($params->get('show_readmore') && $this->item->readmore) {
    44.     if (!$params->get('access-view')) {
    45.         $args['more'] = JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
    46.     } elseif ($readmore = $this->item->alternative_readmore) {
    47.         $args['more'] = $readmore;
    48.     } else {
    49.         $args['more'] = JText::_('TPL_WARP_CONTINUE_READING');
    50.     }
    51. }
    52. // render template
    53. echo $warp['template']->render('article', $args);

    Мне надо его ВЕСЬ взять в див....
     
  14. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
    Там какая то магия. А мне кажется ссылка должна помочь. Предположительно нужно смотреть здесь
    $args =include(__DIR__.'/../article_defaults.php');
     
  15. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    в этом файле такая же магия((
    ни одного дива
    PHP:
    1. <?php
    2. /**
    3. * @package   Warp Theme Framework
    4. * @author    YOOtheme http://www.yootheme.com
    5. * @copyright Copyright (C) YOOtheme GmbH
    6. * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
    7. */
    8.  
    9. $default_args = array(
    10.     'permalink' => '',
    11.     'image' => '',
    12.     'image_alignment' => '',
    13.     'image_alt' => '',
    14.     'image_caption' => '',
    15.     'title' => '',
    16.     'title_link' => '',
    17.     'author' => '',
    18.     'author_url' => '',
    19.     'date' => '',
    20.     'datetime' => '',
    21.     'category' => '',
    22.     'category_url' => '',
    23.     'hook_aftertitle' => '',
    24.     'hook_beforearticle' => '',
    25.     'hook_afterarticle' => '',
    26.     'article' => '',
    27.     'tags' => '',
    28.     'edit' => '',
    29.     'url' => '',
    30.     'more' => '',
    31.     'previous' => '',
    32.     'next' => '',
    33.     'is_column_item' => ''
    34. );
    35.  
    36. if (!isset($item, $params)) {
    37.     return $default_args;
    38. }
    39.  
    40. // Create shortcuts to some parameters.
    41. $images    = json_decode($item->images);
    42.  
    43. $args = array_merge($default_args, array(
    44.     'permalink'          => JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug), true, -1),
    45.     'image'              => isset($images->image_fulltext) && $params->get('access-view') ? htmlspecialchars($images->image_fulltext) : '',
    46.     'image_alignment'      => !isset($images->float_fulltext) || empty($images->float_fulltext) ? htmlspecialchars($params->get('float_fulltext')) : htmlspecialchars($images->float_fulltext),
    47.     'image_alt'          => isset($images->image_fulltext_alt) ? htmlspecialchars($images->image_fulltext_alt) : '',
    48.     'image_caption'      => isset($images->image_fulltext_caption) ? htmlspecialchars($images->image_fulltext_caption) : '',
    49.     'title'              => $params->get('show_title') ? $this->escape($item->title) : '',
    50.     'title_link'          => $params->get('link_titles'),
    51.     'author'              => $params->get('show_author') ? ($item->created_by_alias ? $item->created_by_alias : $item->author) : '',
    52.     'author_url'         => !empty($item->contactid) && $params->get('link_author') == true ? JRoute::_('index.php?option=com_contact&view=contact&id='.$item->contactid) : '',
    53.     'date'                    => $params->get('show_create_date') ? $item->created : '',
    54.     'date_published'      => $params->get('show_publish_date') ? $item->publish_up : '',
    55.     'date_modified'      => $params->get('show_modify_date') ? $item->modified : '',
    56.     'datetime'              => substr($item->publish_up, 0, 10),
    57.     'category'             => $params->get('show_category') ? $this->escape($item->category_title) : '',
    58.     'category_url'          => $params->get('link_category') && $item->catslug ? JRoute::_(ContentHelperRoute::getCategoryRoute($item->catslug)) : '',
    59.     'hits'                  => $params->get('show_hits') ? $item->hits : '',
    60.     'hook_aftertitle'      => !$params->get('show_intro') ? $item->event->afterDisplayTitle : '',
    61.     'hook_beforearticle' => $item->event->beforeDisplayContent.(isset($item->toc) ? $item->toc : ''),
    62.     'hook_afterarticle'  => $item->event->afterDisplayContent
    63. ));
    64.  
    65.  
    66. return $args;
     
  16. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
    гугл говорит joomla/components/com_content/views/article/tmpl/default.php
     
  17. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    нет)))
    еще раз. мне НЕ надо менять все артикли на всем сайте! Мне нужно КОНКРЕТНО в БЛОГЕ категорий сделать див вокруг итема(артикля)

    путем тыканий я поняла что и где менять
    осталось понять КАК ибо я не знаю ПХП!!!!!

    PHP:
    1. // template args
    2. $args = array_merge($args, array(
    3.     'image' => isset($images->image_intro) ? htmlspecialchars($images->image_intro) : '',
    4.     'image_alignment' => !isset($images->float_intro) || empty($images->float_intro) ? htmlspecialchars($params->get('float_intro')) : htmlspecialchars($images->float_intro),
    5.     'image_alt' => isset($images->image_intro_alt) ? htmlspecialchars($images->image_intro_alt) : '',
    6.     'image_caption' => isset($images->image_intro_caption) ? htmlspecialchars($images->image_intro_caption) : '',
    7.     'article' => $this->item->introtext,
    8.     'is_column_item' => (isset($this->item->is_column_item)) ? $this->item->is_column_item : 0
    9.  
    10. ));
    11.  
    12. // set edit
    13. $args['edit']  = $canEdit ? JHtml::_('icon.edit', $this->item, $params) : '';
    14. $args['edit'] .= $params->get('show_print_icon') ? JHtml::_('icon.print_popup', $this->item, $params) : '';
    15. $args['edit'] .= $params->get('show_email_icon') ? JHtml::_('icon.email', $this->item, $params) : '';
    16.  
    17. // set url
    18. if ($params->get('access-view')) {
    19.     $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
    20. } else {
    21.     $menu = JFactory::getApplication()->getMenu();
    22.     $active = $menu->getActive();
    23.     $itemId = $active->id;
    24.     $link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
    25.     $returnURL = ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid);
    26.     $link = new JURI($link1);
    27.     $link->setVar('return', base64_encode($returnURL));
    28. }
    29. $args['url'] = $link;
    30.  
    31. // set more
    32. if ($params->get('show_readmore') && $this->item->readmore) {
    33.     if (!$params->get('access-view')) {
    34.         $args['more'] = JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
    35.     } elseif ($readmore = $this->item->alternative_readmore) {
    36.         $args['more'] = $readmore;
    37.     } else {
    38.         $args['more'] = JText::_('TPL_WARP_CONTINUE_READING');
    39.     }
    40. }
    41.  
    42. // render template
    43. echo $warp['template']->render('article', $args);
    Начиная с 7 строки(включительно) и до 41 строки мне ВСЕ это надо взять в DIV

    как ни пыталась - ругается то на одно то на другое(((
    чаще орет что мол ">" низк, надо ")"
    меняю на ) опять на что то ругается....
    КАК именно мне взять это в див?
     
  18. nospiou

    nospiou Старожил

    С нами с:
    4 фев 2018
    Сообщения:
    3.400
    Симпатии:
    510
    Ну значит этим же методом и нужно продолжать. Он никогда не поводит)
    '<div>'.$this->item->introtex.'</div>'
     
  19. ziz6ka

    ziz6ka Новичок

    С нами с:
    11 апр 2018
    Сообщения:
    12
    Симпатии:
    0
    УРА!!
    У меня получилось!

    Если вдруг кому -то поможет
    Вот код (blog_item.php)
    PHP:
    1. foreach ($this->intro_items as $item) {
    2.     $column = $i++ % $num_columns;
    3.  
    4.     if (!isset($columns[$column])) {
    5.         $columns[$column] = '';
    6.     }
    7.  
    8.     $this->item=$item;
    9.     $this->item->is_column_item = ($num_columns > 1);
    10.     $columns[$column] .= '<div class="block_formy">';
    11.     $columns[$column] .= $this->loadTemplate('item');
    12.     $columns[$column] .= '</div>';
    13.  
    14. }
    где $columns[$column] .= $this->loadTemplate('item'); -вывод итема(артикля) в колонках

    поэтому просто взяла и обособила команду дивом
    $columns[$column] .= '<div class="block_formy">';
    $columns[$column] .= $this->loadTemplate('item');
    $columns[$column] .= '</div>';
    Всем спасибо за интенцию!!!