Integrate code in (blog) articles

hi everybody

for my personal blog i am switch from wordpress to kirby. i’m not realy a developer, but i have skills in hmtl/css and love the simplecity from kirby.

for some articles in my blog i integrate a slider. now i need to admin my settigs for this in a general place, not in selected articles.

here the code:

<script type="text/javascript">
	$(document).ready(function() {
$('.owl-carousel').owlCarousel({
    loop:false,
    margin:10,
    nav:true,
    responsive:{
        0:{
            items:1
        },
        600:{
            items:2
        },
        1000:{
            items:3
        }
    }
})
	});
	
</script>

whats the best practice? create a own kirbytext? or work with filters?

thanks for your input

andi

Is that always the same piece of javascript? Then you could just put it into the footer of the corresponding page, depending on template or a setting in the file.

hi

no, i think i need 2 - 3 different codes and need a flexible way to but it into a blogarticle.

best regards

andi

Then I would go for a Kirbytag.

thanks. then i give it a try tomorrow. hope i can create it with the sample in the documentation :wink:

good morning

it works like a charm.

best regards