Sort search results by field

13 posts by 3 authors in: Forums > CMS Builder
Last Post: June 25, 2018   (RSS)

By Damon - June 22, 2018

For limiting uploads, you can also use code like this:

<?php foreach ($record['image'] as $index => $upload): ?>
   <?php if ($index >= 1) { continue; } // limit uploads shown ?>
      <img src="<?php echo htmlencode($upload['urlPath']) ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" />
<?php endforeach ?>

In CMS Builder, when you are using the Code Generator, one of the options is to Show Uploads (Show all uploads, Show 1 uploads, etc). Choosing the option to show a specific number of uploads will also generate the code needed.

Hope this helps!

Damon Edis -

Hire me! Save time by getting our experts to help with your project.

By dccreatives - June 25, 2018

OK. Something I got to work. I am getting an error, and it isnt really separating them by LED and not. 

Please advise.