Home | Products | Consulting | Hosting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Detail page within a detail page

 

 


rjbathgate
User

Jun 23, 2008, 10:34 PM

Post #1 of 3 (228 views)
Shortcut
Detail page within a detail page Can't Post

Firstly, a huge thank you Dave for your help on my last question!

I have a detail page, on which I have a link to a second detail page. I'm having real trouble keeping the record the same - i.e. say we're on record D on detail page 1, when clicking the link to detail page 2, we're loosing the fact we're on record D.

On detail page 1, we have:

Code
<a href="detail-two.php">View Floor Plan</a>


I've tried making the link as:

Code
<a href="detail-two.php?reference=<?php echo $saleRecord['reference'] ?>">View Floor Plan</a>


To make it point to detail-two.php?reference=D for example, but this doesn't work.

Also tried adding in code into there where => of step 1 of detail page 2, but nothing i've tried works - we either revert to record A, or no record at all.

I can see it being really easy and obvious, but can't get it to work anyway I try...

Normally I would just use:

Code
<?php echo $saleRecord['_link'] ?>

but this obviously reverts to the first detail page as defined in the admin setup of the table in the CMS.

NB will ultimately have more than one additional detail page, but presuming solution to this will work for others.

Thank you heaps in advance,

Rob


Dave
Staff / Moderator


Jun 23, 2008, 11:39 PM

Post #2 of 3 (226 views)
Shortcut
Re: [rjbathgate] Detail page within a detail page [In reply to] Can't Post

Hi Rob,

The detail viewer looks for the record number on the end of the url by default. So all you need to do is add that:
<a href="detail-two.php?<?php echo $saleRecord['num'] ?>">View Floor Plan</a>

If you want the keywords in the url too from the title (or whatever you have it set to (if it's setup) you can get that with <?php echo $saleRecord['_filename'] ?> so you'd use:
<a href="detail-two.php?<?php echo $saleRecord['_filename'] ?>-<?php echo $saleRecord['num'] ?>">View Floor Plan</a>

If you haven't used those yet you can take a look under: Admin > Section Editors > Viewer Urls > Filename Fields.

And some great debugging code if you want to see all the "fields" that are available inside a variable is this:
<xmp><?php print_r($saleRecord); ?></xmp>

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com


rjbathgate
User

Jun 23, 2008, 11:49 PM

Post #3 of 3 (225 views)
Shortcut
Re: [Dave] Detail page within a detail page [In reply to] Can't Post

Hi Dave!

Thank you, that worked a treat - awesome. You're a jedi.

Rob

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Hosting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4