Bread Crumbs
7 posts by 3 authors in: Forums > CMS Builder
Last Post: January 21, 2011 (RSS)
http://www.rentittoday.com/viewers/healthcare_equipment_rentals_details.php?Sacramento-Fetal-Doppler-Monitor-Rental---Baby-Heartbeat-Monitors---California-Durable-Medical-Equipment-Rental-2704
Let me know. Thanks Guys.
Re: [rentittoday] Bread Crumbs
By Jason - January 10, 2011
If you're listing all of your states in the list options box, you can specify a value and a label by using the pipe "|" character.
For example:
CA|California
In this example, CA is the value, and California is the label. If you do it like this, you won't have to re-select the states for each record because the value isn't changing, just the label. To output this, you can use the :label pseudo field like this:
<?php echo $record['state:label'];?>
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] Bread Crumbs
"Notice: Undefined index: state:label in d:\domains\rentittoday.com\wwwroot\viewers\costume_rentals_details.php on line 543"
This is the code I used to display the state:
<?php echo $costume_rentalsRecord['state:label']; ?>
Here is the page it is on:
http://www.rentittoday.com/costume-rentals/Beaverton-Costume-Rentals-Oregon-Mascot-Snowman-Costume-For-Rent-40
I know that originally there was some doubt that this would work on the version of CMS we are using, 2.05 ,could our version be the issue?
Re: [rentittoday] Bread Crumbs
By Jason - January 11, 2011
The label pseudo field became available with version 2.04. Did you have custom coding that would not allow you to upgrade all of your files?
If you could fill out a [url http://www.interactivetools.com/support/]2nd Level Support Request[/url] I can take a quick look at what's going on.
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] Bread Crumbs
Through second level support we were able to achieve the results we needed for the breadcrumbs. :) Now we want to use the same functionality to display the state label on a results page.
At the top of our results we have a line the says "Search Results for ". We then use
@$_REQUEST
to pull the subcategory_match, state_match, and cities_serviced_keyword fields that a user filled out in the search form. The code that successfully displays the state labels for us on a detail page is as follows:
<?php
$record = $air_plane_charter_jetsRecords[0];
foreach($record['state:labels'] as $state){
echo $state . " ";
}
?>
This coding works when a user clicks a breadcrumb from a details page back to the search results page but does not work when a user lands on a search results page. I know why it does not but am unable to change the code so it will. I believe that we need to use the
@_REQUEST
but do not know how to integrate that into the code that will allow the state_match:labels to display.Thanks
Re: [rentittoday] Bread Crumbs
By Chris - January 21, 2011
Can you provide an example URL which has a state_match parameter?
Also, what is the table name of the section with the state list field?
I suspect you'll need to use a function like getListLabels() or getListOptions() to convert your query parameter into a list of labels.
Chris
Re: [chris] Bread Crumbs
The table name is costume_rentals.
If someone searched for costumes in Kentucky, for example, the url would be http://www.rentittoday.com/viewers/costume_rentals_results.php?state_match=KY
Yes, I originally thought that the labels would allow us to display them as simple as
$record['state:label']
but am realizing that that is not the case :)Thanks again!