byrzyi Posted February 15, 2018 Report Share Posted February 15, 2018 Приветствую всех!Есть необходимость вывести все бренды отдельной страницей. Идея создать страницу "Все бренды" в меню админки "Страницы - Другие страницы" (Они выводяться у меня на главной). Цель - разгрузить главную страницу от обилия иконок брендов и в то же время сохранить для индексации с перелинковкойЕсть код с главной что выводит их в main.tpl Вопрос: Как код впихнуть в "Страницу", подскажите пожалуйста. Спасибо! Код брендов с main.tpl: {get_brands var=all_brands} {if $all_brands} <div id="brandList"> <div class="limiter"> <span class="heading">Производители товаров</span> <div class="ajaxContainer"> <div class="items"> {foreach $all_brands as $b} {if $b@iteration < 100} <div class="item"> <div class="tabloid"> {if $b->image} <a href="brands/{$b->url}" class="picture"> <img src="{$config->brands_images_dir}{$b->image}" alt="{$b->name|escape}"> </a> {else} <a class="picture" href="brands/{$b->url}">{$b->name}</a> {/if} </div> </div> {/if} {/foreach} </div> </div> </div> </div> {/if} Quote Link to post Share on other sites
byrzyi Posted February 15, 2018 Author Report Share Posted February 15, 2018 Нашел, есть такая тема, мои извинения, как удалить тему не нашел Quote Link to post Share on other sites
byrzyi Posted February 17, 2018 Author Report Share Posted February 17, 2018 В общем потугами нужного результата не получил. Делал через *.tpl - отображается криво. Бренды идут в столбик, как в дефолтном шаблоне. На главной они шли табличкой и адаптировались под разные расширения, вот код вывода брендов: {get_brands var=all_brands} {if $all_brands} <div id="brandList"> <div class="limiter"> <span class="heading">Производители товаров</span> <div class="ajaxContainer"> <div class="items"> {foreach $all_brands as $b} {if $b@iteration < 100} <div class="item"> <div class="tabloid"> {if $b->image} <a href="brands/{$b->url}" class="picture"> <img src="{$config->brands_images_dir}{$b->image}" alt="{$b->name|escape}"> </a> {else} <a class="picture" href="brands/{$b->url}">{$b->name}</a> {/if} </div> </div> {/if} {/foreach} </div> </div> </div> </div> {/if} Масштабирование: <script> $("#topProduct").dwCarousel({ leftButton: ".topBtnLeft", rightButton: ".topBtnRight", countElement: 6, resizeElement: true, resizeAutoParams: { 1920: 5, 1500: 4, 1200: 3, 850: 2, 480: 1 } }); </script> Quote Link to post Share on other sites
Marik35 Posted February 21, 2018 Report Share Posted February 21, 2018 Доброго вечера! тоже вопрос про Брендам, поэтому пишу сюда. Подскажите, возможно ли на странице бренда сделать выбор категорий товаров только этого бренда. Понимаю, что это прописывается где-то в producs.tpl, и producs.php, но где и как? Пожалуйста, подскажите! Quote Link to post Share on other sites
madison21 Posted October 16, 2019 Report Share Posted October 16, 2019 (edited) Хочу вывести конкретные бренды..Делаю так но не срабатываетВ чём может быть причина? {foreach $all_brands as $b} {if $b@iteration == 2} {if $b->id == '111' && $b->id == '112'} <li> {if $b->image} <a href="brands/{$b->url}"><img src="{$config->brands_images_dir}{$b->image}" alt="{$b->name|escape}"></a> {else} <a href="brands/{$b->url}">{$b->name}</a> {/if} </li> {/if} {/if} {/foreach} Edited October 16, 2019 by madison21 Quote Link to post Share on other sites
phukortsin Posted October 16, 2019 Report Share Posted October 16, 2019 В {if $b@iteration == 2} Quote Link to post Share on other sites
madison21 Posted October 16, 2019 Report Share Posted October 16, 2019 Я пробовал ставить <3 например но не работаетпри этом раньше работало, до того как переустановил движок Quote Link to post Share on other sites
phukortsin Posted October 17, 2019 Report Share Posted October 17, 2019 Я пробовал ставить <3 например но не работаетПробуйте ставить <4, потом <5, потом <6 и так далее...при этом раньше работало, до того как переустановил движокПо законам логики выходит, что причина в том, что "переустановил движок"... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.