Multi-search direct link to file upload?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 18, 2016   (RSS)

By Toledoh - October 11, 2016

Hey Guys.

I'm running multiSearch.php and it is working fine.  

With one section that it's searching I need to link directly to the file uploaded - rather than the list page or the detail page.  Is that possible?

The field is "pdf" - but this doesn't work (as I expected it not to).

<?php if (!$record['field2']): ?>
<p><a href="<?php echo PREFIX_URL ?>/<?php echo $record['field1'] ?>" class="">Read More</a></p>
<?php else: ?>
<p><a href="<?php foreach ($record['pdf'] as $index => $upload): ?><?php echo htmlencode($upload['urlPath']) ?><?php endforeach ?>" class="">View <?php echo $record['field2'] ?></a></p>
<?php endif ?>

Cheers,

Tim (toledoh.com.au)

By Toledoh - October 18, 2016

Thanks Damon,  I think the URL field will work.

Cheers,

Tim (toledoh.com.au)