need help with code

4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 22, 2011   (RSS)

Re: [jeffrenner] need help with code

By robin - August 19, 2011

Hey Jeff,

Looks like you have an extra loop that is causing every book to show up on every record.

Instead of:
<?php foreach ($booksRecords as $record): ?>
<?php foreach ($record['books'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>

You could probably use:
<?php foreach ($title['books'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>

And remove the matching endforeach below also.

Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] need help with code

Thanks,
I knew it was probably easy for someone who knows PHP. I am having one other issue that is probably an easy one too. I have links from this page to a detail page but the images won't display on the detail page either. I took the code from another detail page that is identical. The only difference is that I had to move it to a new folder called "members".

I updated the links but can't figure out why the image is not displaying. Not sure if the problem is in the head or the body.

I attached the page and the URL is below:
http://clowninroundbooks.com/pages/membership/BookDetails.php
You don't need to login to access it.
Attachments:

bookdetails.php 11K

Re: [jeffrenner] need help with code

By robin - August 22, 2011

Hey Jeff,

You can leave the image code the same if you move the file around. You don't need anything like $upload['../urlPath']. What happends if you just use the original image code?

Thanks,
Robin
Robin
Programmer
interactivetools.com