Опубликовано: 21 октября 2015

Блок новости рядом с вступительным текстом Есть решение

Подскажите, как можно перенести блок "последних новостей", чтобы они стояли рядом с описанием магазина на главной странице. Спасибо!

Комментарии (1)

  • Решение
    Колмаков Игорь 23 октября 2015 14:50 #

    в файле "home.html" (магазин-витрина-шаблоны)

    1. замените блок

    {if !empty($theme_settings.homepage_about_title) || !empty($theme_settings.homepage_about_body)}
    <div class="about-us fill-background">
    {if !empty($theme_settings.homepage_about_title)}<h1>{$theme_settings.homepage_about_title}</h1>{/if}
    {$theme_settings.homepage_about_body}
    </div>
    {/if}

    на

    <div class="row-grid">
    <div class="col-grid s12 l8">

    {if !empty($theme_settings.homepage_about_title) || !empty($theme_settings.homepage_about_body)}
    <div class="about-us fill-background">
    {if !empty($theme_settings.homepage_about_title)}<h1>{$theme_settings.homepage_about_title}</h1>{/if}
    {$theme_settings.homepage_about_body}
    </div>
    {/if}

    </div>

    <div class="col-grid s12 l4">
    {$last_posts = $wa->blog->posts(null, 4)}
    {if $last_posts}
    <div class="last-post-wrapper mir-matras-mod"><div class="fill-background">
    <h2 class="last-post-header">[`Our news`]</h2>
    {foreach $last_posts as $post}
    <div class="post">
    <h4 class="last-post-title">
    <a href="{$post.link}">{$post.title}</a>
    {* @event prepare_posts_frontend.%plugin_id%.post_title *}
    {if !empty($post.plugins.post_title)}{foreach $post.plugins.post_title as $plugin => $output}{$output}{/foreach}{/if}
    </h4>
    {if $post.album_id}
    {$_post_image = $wa->photos->photos("album/`$post.album_id`", "300x150", 1)}
    {$_post_image = current($_post_image)}
    {if $_post_image}
    <img class="post-image" src="{$_post_image.thumb_300x150.url}" alt="{$_post_image.name|escape}">
    {/if}
    {/if}
    <div class="credentials">
    {if isset($post.user.photo_url_20)}
    {if $post.user.posts_link}
    <a href="{$post.user.posts_link}">
    <img src="{$post.user.photo_url_20}" class="userpic" alt="">
    </a>
    {else}
    <img src="{$post.user.photo_url_20}" class="userpic" alt="">
    {/if}
    {/if}
    {if $post.user.posts_link}
    <a href="{$post.user.posts_link}" class="username">{$post.user.name}</a>
    {else}
    <span class="username">{$post.user.name}</span>
    {/if}
    <i class="mdi-access_time mdi-lg"></i>
    <span class="small date">{$post.datetime|wa_datetime:"humandate"}</span>
    </div>
    <p>{$post.text|strip_tags|truncate:200}</p>
    </div>
    {/foreach}
    </div></div>
    {/if}
    </div>
    </div>

    2. в файле "homepage.lastadd.html" (магазин-витрина-шаблоны)

    замените строку

    {if $last_posts}

    на

    {if $last_posts && 0}

    1

Добавить ответ

Чтобы добавить комментарий, зарегистрируйтесь или войдите

Услуги

Контакты

Дорогие друзья!

К сожалению, Ваш браузер не поддерживает современные технологии используемые на нашем сайте.

Пожалуйста, обновите браузер, скачав его по ссылкам ниже, или обратитесь к системному администратору, обслуживающему Ваш компьютер.

Internet Explorer

от Microsoft

Chrome

от Google

Safari

от Apple

Opera

от Opera Software

Firefox

от Mozilla

Вверх