Re: leftJoin (with images and multiple "joins" and multi-selects)

2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 3, 2023   (RSS)

By kitsguru - April 1, 2023

In response to: https://www.interactivetools.com/forum/forum-posts.php?postNum=2238306#post2238306


    <?php foreach ($blogRecords as $record): ?>

    <h1><?php echo htmlencode($record['title']) ?></h1>

    <?php foreach ($record['upload'] as $index => $upload): ?>
      <img src="<?php echo $SETTINGS['uploadUrl'] ?>/<?php echo htmlencode($upload['urlPath']) ?>" alt="<?php echo htmlencode($record['title']) ?>" class="width"/>
    <?php endforeach ?>


    <?php endforeach ?>

This code only works if the "General Setting-> Upload Folder URL" is relative to the root such as 'cmsb/uploads' as $SETTINGS['uploadUrl'] is imcomplete. While you can enter 'uploads' and the preview shows the path relative to the root. Also it will not work with a custom directory.

I am trying to figure out the proper way to reference the true and complete path. Any help is appreciated.

Jeff Shields