Detail page within a detail page

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 24, 2008   (RSS)

Re: [rjbathgate] Detail page within a detail page

By Dave - June 24, 2008

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

Re: [Dave] Detail page within a detail page

By rjbathgate - June 24, 2008

Hi Dave!

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

Rob