Bread Crumbs

7 posts by 3 authors in: Forums > CMS Builder
Last Post: January 21, 2011   (RSS)

I hope you are well. I have a question in regards to a bread crumb issue. In the orginal setup of CMS all of our states were abbreviated in a drop down box. Example CA was for California. On the front end of website pages we display the State Spelled out completely. If you click on the link below you will notice the state is abbreviated. Is there an easy way I can convert it to a spelled out state????? This would help a bunch for SEO .

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.
Jason Glass

Re: [rentittoday] Bread Crumbs

By Jason - January 10, 2011

Hi,

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

We added the labels into our CMS. But we are getting an undefined index error for the "label":

"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?
Jason Glass

Re: [rentittoday] Bread Crumbs

By Jason - January 11, 2011

Hi,

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: [rentittoday] Bread Crumbs

By Chris - January 21, 2011

Hi rentittoday,

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.
All the best,
Chris

Re: [chris] Bread Crumbs

We do this on all categories which are all set up as separate tables but costumes is the example we used earlier.

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!
Jason Glass