Answer the question
In order to leave comments, you need to log in
How to display the property value in the public part of Bitrix?
Hello, I installed platform 1 with Bitrix, I am making a slider. To describe the slide, I made a property. ZAGOLOVOK. How can I make it show up? and how to insert all this into the html layout
<div class="container">
<div class="row">
<div class="top-slide">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Содержимое слайдов -->
<div class="carousel-inner">
<div class="item active">
<img src="img/1.jpg" alt="...">
<div class="carousel-captions">
<h3>Россия (Москва)</h3>
<p>Где это видано, чтобы люди в Москве без прописки проживали.</p>
</div>
</div>
<div class="item">
<img src="img/2.jpg" alt="...">
<div class="carousel-captions">
<h3>Осень</h3>
<p>Осень — это вторая весна, когда каждый лист — цветок.</p>
</div>
</div>
<div class="item">
<img src="img/3.jpg" alt="...">
<div class="carousel-captions">
<h3>Дождь</h3>
<p>Осень опять идут дожди...</p>
</div>
</div>
</div>
<!-- Стрелки -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicons glyphicons-left-arrow"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicons glyphicons-right-arrow"></span>
</a>
</div>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
More or less like this:
<?php
if(CModule::IncludeModule("iblock")){ // подключаем необходимый модуль
$rsEl=CIBlockElement::GetList( //делаем запрос к инфоблоку
Array("SORT"=>"ASC"), // сортировка
Array("IBLOCK_ID"=>2,"ACTIVE"=>"Y"), // фильтр
false,
false,
Array("IBLOCK_ID","ID","NAME","LIST_PAGE_URL","CODE","PICTURE") // какие параметры выводить, если вывести все подряд, то оставляешь пустой массив, но для вывода твоего свойства нужно указывать явно PROPERTY_ZAGOLOVOK
);
while ($arEl = $rsEl->GetNext()){
echo '<pre>'.print_r($data,true).'</pre>'; // выводим содержимое
}
}
You need this:
1) create an infoblock to store information on the slider (photo, slide title, link);
2) display the bitrix:news.list component in the place where the slider is needed
3) specify in the component settings the infoblock that stores information, specify in it additional. properties that you need
4) copy the component template and bring it to your view.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question