Hi Everyone,

I've been reading the Greenash articles on Taxonomy and Heirarchical URL Aliasing, and I don't see an answer to what i'm trying to do here... My question is pretty simple. I've removed "?q=" by enabling the Clean URL module, but I want to go a step further and alias all of the variables in the url.

You can see the actual page i'm looking at here:
http://sanluisrealtor.studiocreek.com/real_estate_search?City=Atascadero...

And I need the path to look like this:
.../real_estate_search/Atascadero/3/2/0/500000 or: .../real_estate_search/Atascadero-3-Bedrooms-2-Bathrooms-Min-0-Max-500000

I've been stuck on this problem for a while now and need a hand. Are there any kind folks out there who can give me a little help? I would really appreciate it!

Thanks!

Comments

sepeck’s picture

Turn on path module
go to admin / URLAlias

set taxonomy/5 == /real_estate_search/Atascadero/3/2/0/500000
That is an approximation of course.

Not a bad start on a mod of SpreadFireFox theme. Header and neon sidebar colors don't quite go together.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

jenkins-1’s picture

First of all, thanks for your help speck!

If I was trying to sort this data and get the URLs to alias the way I want them to - do I need to create a term in taxonomy for each possible output? If so, we're talking about thousands of possibilities here (the last 2 variables I have are for minimum and maximum price... and these are values that the user will define - so there would be a ton of possible outputs)

Isn't there a way of setting up a simple mod re-write (similar to the way the clean url utility removes the "?q=" to clean up my additional variables without doing anything to the taxonomy?

varunvnair’s picture

Also check out the pathauto module.

My Drupal-powered Blog: ThoughtfulChaos

Zach Harkey’s picture

I realize that this is not an answer to your question, but how did you integrate your MLS listings so well? It looks so good. I need to do the exact same thing. Could you point me in the right direction?

-zach
------------------------
harkey design

: z

rjl’s picture

Not sure what module they are using but http://www.chicagoartistsresource.org/ has a job search feature that appears to pass the search parameters as /3/4/5/6 etc. It should be noted that their site does not have clean urls turned on, but still worth checking out.

I imagine they are using the Job Search Module but I have yet to try that module, so could also be there own code.

jenkins-1’s picture

The way this site is displaying jobs (as you mentioned) is more similar to what i'm after.

Basically I have one node (.../node/54)
but I want to create a bunch of pages from this node since I can pass vairables in the URL to filter the data...

So one page would be .../node/54?Foo1=Bar1&Foo2=Bar2
but would be aliased to look like ".../bar1/bar2"

Another page would be .../node/54?Foo7=Bar7&Foo8=Bar8
but would be aliased to look like ".../bar7/bar8"

"URL Alias" doesn't seem to do what I want:
I've tried setting "node/54?Foo1=Bar1&Foo2=Bar2" == "Bar1/Bar2" but this didn't work...

"Path Module" is on and is cleaning up the "?q="
but it's not filtering out the other variables in the URL...

"PathAuto" looks like it could work:
but from what i've seen it only "Generates aliases for all existing nodes which do not already have aliases." (i.e. - one alias per node - right?)
I have a single node and I want to create several variations (using URL variables) - each with a different alias (every change in the URL variables should be a change in the alias)

Doesn't that leave only a custom mod re-write solution?

Shouldn't I be able to hack the file for Clean URLs and tell it to replace all variables in the URL with a "/" or an "_"?

Any more ideas?
I'm getting desperate here ;)

rjl’s picture

I am a little confused now... You said

Basically I have one node (.../node/54)

I thought, surely this a mistake and that you must have meant you have one node for each property. But the more I read your post, the more I realized that you did indeed mean to say you had one node.

So then, I decided to look at your page's source code and, I think, yes, it is one node, including the form, the 5 select menus and the submit button at the top, and the 30 plus properties. All of these things are included in the body of the one single node.

Is this correct?

jenkins-1’s picture

Correct! I have one node (that is the node for my search results page) ... but each variation in that node's URL (as defined by the URL parameters) should have its own link that looks clean.

Is there a better way to set this up in order to get the desired structure i'm after?

Thanks!