show multiple records under a same article

5 posts by 2 authors in: Forums > CMS Builder
Last Post: February 13, 2013   (RSS)

By jjem - February 13, 2013

Hello,

I am trying to set up an admin control of a slider.

1) I created a "Slides" section where the user just enters a slide id and a background image (in red below). I will the include the correct code from the code generator.

Within those "Slides" there are text and "front" images that have to be controled from the admin.

2) I created a slide_images section (as a category section) where the user can upload the "front images" and other informations into different fields (in green below).

The structure would be:

<section id="feature_slider" class="">

<article class="slide" id="showcasing" style="background: url('img/backgrounds/landscape.png') repeat-x top center;">

       <img class="asset left-30 sp600 t120 z1" src="img/slides/scene1/macbook.png" />

       <div class="info">
       <h2>Beautiful theme for showcasing your works.</h2>
       </div>
</article>
<article class="slide" id="ideas" style="background: url('img/backgrounds/aqua.jpg') repeat-x top center;">
       <div class="info">
      <h2>We love to turn ideas into beautiful things.</h2>
      </div>
      <img class="asset left-480 sp600 t260 z1" src="img/slides/scene2/left.png" />
      <img class="asset left-210 sp600 t213 z2" src="img/slides/scene2/middle.png" />
      <img class="asset left60 sp600 t260 z1" src="img/slides/scene2/right.png" />
</article>
<article class="slide" id="tour" style="background: url('img/backgrounds/color-splash.jpg') repeat-x top center;">
<img class="asset left-472 sp650 t210 z3" src="img/slides/scene3/ipad.png" />
<img class="asset left-365 sp600 t270 z4" src="img/slides/scene3/iphone.png" />
<img class="asset left-350 sp450 t135 z2" src="img/slides/scene3/desktop.png" />
<img class="asset left-185 sp550 t220 z1" src="img/slides/scene3/macbook.png" />
<div class="info">
<h2>Fully Responsive theme</h2>
<a href="features.html">TOUR THE PRODUCT</a>
</div>
</article>
<article class="slide" id="responsive" style="background: url('img/backgrounds/indigo.jpg') repeat-x top center;">
<img class="asset left-472 sp600 t120 z3" src="img/slides/scene4/html5.png" />
<img class="asset left-190 sp500 t120 z2" src="img/slides/scene4/css3.png" />
<div class="info">
<h2>
Responsive <strong>HTML5 & CSS3</strong>
Theme
</h2>
</div>
</article>
</section>

How can include the slide_images  information within the "Slides". Could anyone help?

Many Thanks,

Jeremy

Hi, 

I'm sure this should be possible, but I'll need a bit more information. Are the slides and slide_images sections linked in any way using a field (like this: http://www.interactivetools.com/kb/article.php?Populate-a-list-field-from-another-section-15)?  Would it be possible to combine these two sections into one instead? As this could make the code a lot simpler.  

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Hi Jeremy,

OK, let me know if you can't combine them, as another option is to use the leftJoin function, this post explains how to use it:

http://www.interactivetools.com/forum/forum-posts.php?postNum=2229022#post2229022

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By jjem - February 13, 2013

Hi Greg,

The one section solution was indeed the best idea.

Thanks again for your suggestion!

Jeremy