If single record go directly to Details Viewer

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

Re: [fleff] If single record go directly to Details Viewer

By Jason - November 28, 2011

Hi Farnham,

What you need to do is take out the <?php ?> tags where you're outputting the record num. You don't need these tags are you are already inside a PHP block.

Try this:

<?php if ($itemsMetaData['totalRecords'] == 1): {
header("Location: /items_details.php?". $record['num'] );
exit;
}
?>
<?php endif ?>


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/

Re: [Jason] If single record go directly to Details Viewer

By fleff - November 28, 2011

Thanks, Jason, but I'm still getting the details viewer for the first record in the section rather than the record found in the search. I checked to see what record number is found and it's the correct one for the record I want, but apparently the code is not adding it to the URL for the details page.

Farnham

Re: [fleff] If single record go directly to Details Viewer

By Jason - November 29, 2011

Hi,

Could you attach the .php file you're working with along with a link to an example that demonstrates the problem? That way, I can take a closer look.

If you don't want to post this information in the forum, please email it to support@interactivetools.com

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/