<div class="container-fluid px-md-1 py-5 bgcolor_gray">
  <div class="container">
    <div class="row mt-3 space-top">
      <?php foreach ($viewContents as $key => $content) { ?>
        <!-- Bootstrap Break Points -->
        <div class="col-xs-12 col-sm-12 col-md-4 col-xl-4 col-xxl-4 p-4 gx-md-4">

          <a href="<?= $this->Url->build([
            'controller' => $this->request->getParam('subsection')
              ? $this->request->getParam('subsection')
              : ($this->request->getParam('section')
                ? $this->request->getParam('section')
                : $this->request->getParam('controller')),
            'action' => 'details',
            $content->id
          ]) ?>">
            <div class="bg-light la_2col_card-1 text-center">
              <div class="two-col-aspect-img">
                <img
                  src="<?= $this->Url->image(sizeof($content->content_images) > 0 ? $content->content_images[0]->image_path : 'noimage.png') ?>"
                  class="img-responsive img-fluid" alt="">
              </div>

              <div class="box pt-5 pb-5">
                <h5 class="fw-bold">
                  <?= $this->Text->truncate(strip_tags($content->name), 50, ['ellipsis' => '...', 'exact' => false]) ?>
                </h5>
              </div>
            </div>
          </a>

        </div>
        <!-- Break Point Ends Here -->

      <?php } ?>
    </div>
  </div>
</div>