mulitple urls for one listing

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

By rentittoday - January 5, 2011

Hello,
Right now there are multiple urls that point to each listing on our site for example:

http://www.rentittoday.com/medical-equipment-rentals/Detroit-Medical-Equipment-Rental---Drager-Narkomed-2C-System---Michigan-Anesthesia-Machine-Rentals-2421
http://www.rentittoday.com/medical-equipment-rentals/item_number=2421
http://www.rentittoday.com/medical-equipment-rentals/2421http://www.rentittoday.com/medical-equipment-rentals/num-2421
Basically, anything that has "medical-equipment-rentals" and the item number in it, will take you to that page. We are wanting to "contain" this, if you will, by limiting the number of urls that will bring a user to a certain listing. We would really like only the first url listed above, that uses the listings name and number, to actually go that particular lisiting. Is there a way to accomplish this in CMS? Or is this more of a modRewrite issue?

Thanks !
Jason Glass

Re: [rentittoday] mulitple urls for one listing

By Jason - January 5, 2011

Hi,

How are you getting these different versions of the url? There are two ways to accomplish what you're looking for. One is to set up the Viewer Url section in each of your section editors. Then when need a url to that page, use the ['_link'] pseudo field.

The other way is to always manually create your url, but to do it the same way each time.

For example:

<a href="http://www.rentittoday.com/medical-equipment-rentals/<?php echo str_replace(" ","-",$record['name'])."-".$record['num'];?>">*LINK TEXT*</a>

Does this seem like what you're looking for?

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] mulitple urls for one listing

By Jason - January 10, 2011

Hi,

The "Filename Fields" list will only use the first non-empty field you enter into it, so by default, there isn't a way to get more than one field into your url string.

There are a couple of things you can do:
1) You can custom create each of your urls. You would have to do this for each template.
2) You can create a new field in your section where you specify what your want in the url string and then use this when outputting your links.
3) We can do some custom coding to allow more than 1 field to appear as part of the ['_linl'] pseudo field.

If you're interested in this last option, please send an email to consulting@interactivetools.com and we can get you an estimate on what this would cost.

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/