Jump to content

deadbeat

Members
  • Posts

    5
  • Joined

  • Last visited

deadbeat's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. HI, I have the code below in a page and the repeater works fine. Is it possible to paginate after a set number of repeats? <div class="container"> <div class="row"> <?php foreach($page->children as $c) { ?> <div class="col-xs-6 col-md-4"> <h3><?php echo $c->title; ?></h3> <p><?php echo $c->festivals_body; ?> </p><hr> </div> <?php }?> </div> <!-- closing row --> <?php $results = $page->children("start=0, limit=9"); $pagination = $results->renderPager(); echo $pagination; ?> Thanks
  2. Is it possible to have a repeater in an accordion panel group? The title in the title part of the panel and the body text in the body section. I have adapted the code below and had a little success. but only one panel. I have put the code before the accordion and each panel is the same. Have I used the wrong PHP for this? <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingOne"> <h4 class="panel-title"> <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> Collapsible Title here. </a> </h4> </div> <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne"> <div class="panel-body"> <?php foreach($page->chinese_festivals as $festivals) { echo "<p>{$festivals->festivals_title}</p>"; echo "<p>{$festivals->festivals_body}</p>"; } ?> </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingTwo"> <h4 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> Collapsible Group Item #2 </a> </h4> </div> <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo"> <div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingThree"> <h4 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> Collapsible Group Item #3 </a> </h4> </div> <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree"> <div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> </div> Thanks
  3. Hello I am new on here... I am trying to create a page that has four columns and several rows. each column at the moment should show a different city from a child page but it is only showing the last city in each well, the code works to the point of the last city but does not show the first city. I have included the code below which I have "borrowed" from <div class="container"> <?php foreach($page->children as $c); ?> <div class="row"> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> </div> <div class="row"> <?php foreach($page->children as $c); ?> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> <div class="col-xs-6 col-md-3"> <div class="well"><h2><?php echo $c->title; ?></h2> <p><?php echo $c->summary; ?></p></div> </div> </div> </div> What am I missing ? Thanks
×
×
  • Create New...