Skip to content

Commit 2e6e9e6

Browse files
authored
introduce blocks to stop template
1 parent 8d0dee1 commit 2e6e9e6

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11

22
</div>
3-
<?php if ($this->sliderPagination): ?>
4-
<div class="swiper-pagination"></div>
5-
<?php endif; ?>
6-
<?php if ($this->sliderButtons): ?>
7-
<div class="swiper-button-prev"></div>
8-
<div class="swiper-button-next"></div>
9-
<?php endif; ?>
10-
<?php if ($this->sliderScrollbar): ?>
11-
<div class="swiper-scrollbar"></div>
12-
<?php endif; ?>
3+
<?php $this->block('controls'); ?>
4+
<?php if ($this->sliderPagination): ?>
5+
<div class="swiper-pagination"></div>
6+
<?php endif; ?>
7+
<?php if ($this->sliderButtons): ?>
8+
<div class="swiper-button-prev"></div>
9+
<div class="swiper-button-next"></div>
10+
<?php endif; ?>
11+
<?php if ($this->sliderScrollbar): ?>
12+
<div class="swiper-scrollbar"></div>
13+
<?php endif; ?>
14+
<?php $this->endblock(); ?>
1315
</div>
1416

15-
<script>
16-
initSwiper({
17-
id: '<?= $this->sliderId ?>',
18-
wrapperClass: '<?= $this->wrapperClass ?>',
19-
params: <?= json_encode($this->parameters) ?>
20-
});
21-
</script>
17+
<?php $this->block('script'); ?>
18+
<script>
19+
initSwiper({
20+
id: '<?= $this->sliderId ?>',
21+
wrapperClass: '<?= $this->wrapperClass ?>',
22+
params: <?= json_encode($this->parameters) ?>
23+
});
24+
</script>
25+
<?php $this->endblock(); ?>
2226

2327
</div>

0 commit comments

Comments
 (0)