Thanks for reply Hanni,
Yeah i am new to PW, right now still struggling to get pages slides...
you can see full code
https://github.com/jsanglier/bootwire/blob/master/templates/includes/functions.inc
this is my version but right now it doesnt show and no error shown.
function bootwireCarousel(){
// We will need to treat the first image separately
$slides = wire("pages")->find("parent=/slideshow/, template=slidefeat, limit=3, sort=-date");
$firstImage = $slides->first();
$out =" ";
// The indicators
$out .="<ol class='carousel-indicators'>";
// the carousel indicators need to start at 0
$count = -1;
foreach($slides as $slide) {
$activeClass = ($slide === $firstImage ? 'active' : '');
$count++;
$out .="<li data-target='#myCarousel' data-slide-to='{$count}' class='{$activeClass}'></li>";
}
$out .="</ol>";
// Carousel Items
$out .="<div class='carousel-inner'>";
foreach($slides as $slide) {
$activeClass = ($slide === $firstImage ? 'active' : '');
$out .="<div class='{$activeClass} item'>";
$out .="<img src='{$slide->images->url}' />";
$out .="<div class='container'>";
$out .="<div class='carousel-caption'><h1>{$slide->title}</h1><p class='lead'>{$slide->body}</p></div>";
$out .="</div>"; // /container
$out .="</div>";
}
$out .="</div>"; // /carousel inner
// Carousel optional nav - you can remove these if you dont want the side arrows
$out .="<a class='carousel-control left' href='#myCarousel' data-slide='prev'>‹</a>";
$out .="<a class='carousel-control right' href='#myCarousel' data-slide='next'>›</a>";
if($firstImage) {
echo "<section id='myCarousel' class='carousel slide'>{$out}</section>";
}
}