Combining Records & adding PDF File Link

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 22, 2012   (RSS)

By csdesign - July 20, 2012

Hello!
Okay... so as I'm saying this I know it sounds easy but for whatever reason I have been fighting it for hours and I'm obviously just missing something. Help would be GREATLY appreciated!!

Here's my working copy of a current property listing page:
http://www.dunhamrealestateservices.com/listingDetail7.php?Commercial-business-in-Cooke-City-MT-near-NE-Entrance-to-Yellowstone-Park-44

All I wanted to do was to add an optional pdf file upload. If they upload a pdf file it shows, if not, it does not show. Simple enough, right? :)

This is the code for the pdf upload that I want to merge into the property listing (just under the description field):
http://www.dunhamrealestateservices.com/listingDetail6.php?Commercial-business-in-Cooke-City-MT-near-NE-Entrance-to-Yellowstone-Park-44

Both pages work as they should but when I try to bring them together things just fall apart. It's apparent there are some php code changes on the recent "generate code" results so I'm guessing that's my issue is that I'm using both the old and the new. Is that now going to be an issue anytime I try to utilize previously customized code from prior jobs?

I also created a brand new page, working from the new code generated for a property listing and attempted to do it that way but ran into problems bringing the homepages details in (agent info).
http://www.dunhamrealestateservices.com/listingDetail8.php?Commercial-business-in-Cooke-City-MT-near-NE-Entrance-to-Yellowstone-Park-44

So, I am at the point of needing help. I'm attaching all 3 files listed above (detail6, detail7, detail8).

Ideally, I would just like to take detail7 and add detail6 (the optional pdf link)
At this point I'm not sure if I've made the pdf upload optional either.

Thanks so much for the help!! Tina

Re: [csdesign] Combining Records & adding PDF File Link

By Jason - July 21, 2012

Hi Tina,

Try this. I've highlighted the new code in blue, directly below the current code that outputs the description field:

<tr>
<td>&nbsp;</td>
<td class="textmain"><span class="title"><?php echo $listing['description'] ?></span> </td>
<td class="textmain">&nbsp;</td>
</tr>

<tr>
<td>&nbsp;</td>
<td class="textmain">
<span class="title">
<?php foreach ($listing['pdf_file'] as $pdf): ?>
<a href = "<?php echo $pdf['urlPath'];?>" target="blank">CLICK HERE TO VIEW/PRINT PROPERTY SHEET</a><br/>
<?php endforeach ?>
</span>
</td>

<td class="textmain">&nbsp;</td>
</tr>


That should output the link that you are looking for.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/