Initial commit
This commit is contained in:
20
playarea/templates/productCategory/news.php
Normal file
20
playarea/templates/productCategory/news.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php $page = $b->ls_get_key("page"); ?>
|
||||
<?php $news = $page->get_prop_render_value("product_news_field"); ?>
|
||||
<?php if(!$news) return; ?>
|
||||
<div class="category-wrapper__inner articles">
|
||||
<h2 class="category-wrapper__heading">Статьи</h2>
|
||||
<ul class="category-wrapper__articles">
|
||||
<?php foreach ($news as $key => $value) { ?>
|
||||
<?php $post = new Post(intval($value["item_id"])); ?>
|
||||
<?php if(!$post->get_item()) continue; ?>
|
||||
<li>
|
||||
<figure class="category-wrapper__image">
|
||||
<img src="<?= $post->get_prop_render_value('post_photo') ?>" alt="" />
|
||||
</figure>
|
||||
<a class="category-wrapper__link" href="/post/<?= $post->get_item_slug() ?>/">
|
||||
<?= $post->get_item_name() ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user