Answer the question
In order to leave comments, you need to log in
How to make friends between netcat and bootstrap slider?
Hello
guys, tell me, I'm trying to make a slider on bootstrap, but it doesn't work
System settings
$f_Slider_carousel = array(
'prefix' => "<div class='carousel-item active'>",
'record' => "<img class='d-block w-100' src='%Path%' alt='Первый слайд'>",
'divider' => " ",
'suffix' => "</div>",
'i' => 1
);
$f_Slider_preview = array(
'prefix' => "<div class='carousel-item'>",
'record' => "<img class='d-block w-100' src='%Path%' alt='слайд'>",
'divider' => " ",
'suffix' => "</div>",
'i' => 1
);
<div id="carouselExampleSlidesOnly" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<?php if ($f_Slider->count() > 0): ?>
<?= $f_Slider->set_template($f_Slider_carousel)->get_record(1); ?>
<?= $f_Slider->set_template($f_Slider_preview); ?>
<?php endif; ?>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
Answer the question
In order to leave comments, you need to log in
No system settings are needed.
Create a component, put a static layout in the prefix - check if the slider is displayed.
If it is shown, create the necessary fields, spread the layout code by prefix and suffix, by the field with the object display, and stupidly substitute the output of these same fields into the layout of the objects
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question