need help with code
4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 22, 2011 (RSS)
I am working on a "Members only page for a book club and am having some trouble making the download link for the PDF's display properly. As of right now I have them displayed but they are displaying the PDF downloads for every record. I just need a way to make it display the PDF for that record only but I am stumped.
I am attaching a copy of the page code for your reference.
The URL to the page is: http://www.clowninroundreaders.com/pages/membership/Members.php
It will ask you to a log in. You can use the username: bob and password: smarter to log in.
Any help is appreciated.
Thanks,
Jeff
I am attaching a copy of the page code for your reference.
The URL to the page is: http://www.clowninroundreaders.com/pages/membership/Members.php
It will ask you to a log in. You can use the username: bob and password: smarter to log in.
Any help is appreciated.
Thanks,
Jeff
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:
You could probably use:
And remove the matching endforeach below also.
Hope that helps,
Robin
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
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.
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.
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
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
Programmer
interactivetools.com