Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 4 Ответов
  • 503 Просмотров
*

djwolf

  • Захожу иногда
  • 58
  • 1 / 0
Схлопывание сетки
« : 22.04.2020, 03:06:19 »
Есть идея переверстать шаблон категорий что бы не было такой проблемы как на скрине https://ibb.co/j3yCGbf
Но столкнулся с такой проблемой что сетка шаблона схлопнулась https://ibb.co/jhnP8NS
Не пинайте но в php не особо силен

были удалены
<?php if ($k % $this->count_category_to_row == 0) : ?>
<?php if ($k % $this->count_category_to_row == $this->count_category_to_row - 1) : ?>
<?php if ($k % $this->count_category_to_row != $this->count_category_to_row - 1) : ?>
Код
<?php 
/**
* @version      4.11.0 17.09.2015
* @author       MAXXmarketing GmbH
* @package      Jshopping
* [member=126442]copyright[/member]    Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license      GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');

print $this->_tmp_category_html_start;
?>
<div class="jshop" id="comjshop">
    <h1 class="uk-margin-medium uk-text-center uk-h4 uk-heading-line">
<span class="uk-text-background"><?php print $this->category->name?></span>
</h1>
    <div class="category_description"><?php print $this->category->description?></div>

    <div class="jshop_list_category">
<?php if (count($this->categories)):?>
<div class="jshop list_category">
<div class="uk-child-width-1-<?php echo $this->count_category_to_row;?>@s uk-child-width-1-2 uk-grid-small uk-grid-match uk-margin uk-text-center" uk-grid>
<?php foreach($this->categories as $k=>$category):?>

<div class="uk-card uk-card-default uk-card-small uk-card-body">

<div class="uk-inline-clip uk-transition-toggle sblock2 image">
<a href="<?php print $category->category_link;?>">
<img class="jshop_img" src="<?php print $this->image_category_path;?>/<?php if ($category->category_image) print $category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($category->name)?>" title="<?php print htmlspecialchars($category->name)?>" />
<div class="uk-hidden-touch uk-transition-fade uk-position-cover uk-position-small uk-overlay uk-overlay-default uk-flex uk-flex-center uk-flex-middle"><button class="uk-button uk-button-default">Смотреть все</button></div>
</a>
</div>
<div class="sblock2">
<div class="uk-margin-top category_name"><a class="uk-text-bold product_link" href = "<?php print $category->category_link?>"><?php print $category->name?></a></div>
<span class = "category_short_description"><?php print $category->short_description?></span>                       
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</div>

</div>
<?php print $this->_tmp_category_html_before_products;?> 
    <?php include(dirname(__FILE__)."/products.php");?>
<?php print $this->_tmp_category_html_end;?>
*

kit2m2

  • Живу я здесь
  • 3269
  • 268 / 0
  • Беру сайты на полное сопровождение
Re: Схлопывание сетки
« Ответ #1 : 22.04.2020, 08:20:58 »
Прежде чем что-то удалять, нужно хотя бы понимать для чего это было... Может дело совсем не в этом?
Расширения для JoomShopping | Расширения на заказ | Сайты и магазины под ключ: Дизайн, Верстка, Программирование, СЕО-оптимизация, Сопровождение, Перенос на Joomla 4+ и JoomShopping 5+
*

nevigen

  • Moderator
  • 10436
  • 863 / 25
  • http://n*****n.com
Re: Схлопывание сетки
« Ответ #2 : 22.04.2020, 15:18:15 »
были удалены
<?php if ($k % $this->count_category_to_row == 0) : ?>
<?php if ($k % $this->count_category_to_row == $this->count_category_to_row - 1) : ?>
<?php if ($k % $this->count_category_to_row != $this->count_category_to_row - 1) : ?>
и это проверка счетчика товаров в ряду чтобы перейти на новую строку.
Профессиональные / Бесплатные решения для JoomShopping
Не лечи бесплатно, ибо тот, кто лечится бесплатно, рано или поздно перестает ценить свое здоровье,
а тот, кто лечит бесплатно, рано или поздно перестает ценить результаты своего труда/ (с) Гиппократ?
Не ищите ответов, ищите решение !
*

djwolf

  • Захожу иногда
  • 58
  • 1 / 0
Re: Схлопывание сетки
« Ответ #3 : 22.04.2020, 16:01:36 »
Суть в том что в обычном виде 3 категории в ряд, а в мобильной версии по 2, и тут и выходит одно пустое место
*

djwolf

  • Захожу иногда
  • 58
  • 1 / 0
Re: Схлопывание сетки
« Ответ #4 : 22.04.2020, 18:55:27 »
нашел проблему, не хватало дивов, но так и не понимаю для чего эти счетчики нужны
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться