averyvery / freeway

Simple Routing for EE
43 stars 4 forks source link

MSM Support #8

Open zgordon opened 12 years ago

zgordon commented 12 years ago

Hey man, LOVE this extension and having such flexible control over url segments. However, I'm using it on a MSM site and the routes apply to ALL the sites. Would there be a way to make it work so it has different settings for different sites?

Thanks!

averyvery commented 12 years ago

Oh MSM, you make everything so complicated...

This seems like it would be pretty easy to do. At the moment, I'm not actively working on Freeway, but I'll put this in the queue.

qbmarketing commented 12 years ago

Is it possible to add the domain to the routes to make it specific one site to another?

qbmarketing commented 12 years ago

It appears this DOES work, based on my test.

qbmarketing commented 12 years ago

Wait - spoke too soon. It seemed to work at first, but perhaps my page was cached.

averyvery commented 12 years ago

Think this is covered in the original issue. Sorry, not doing much work on Freeway at the moment — glad to know there's still some issue in the idea, though. Integrating with a specific site from MSM is an interesting problem, and I'll make sure it's on the list if/when I get back to working on Freeway some more.

qbmarketing commented 12 years ago

I actually have it working pretty well the way I want it, but I do see that any path I define in freeway impacts the other site within the MSM installation, so I may not be able to go this route. What would the time it would take you to make it specifically MSM compatible cost? Just curious.

averyvery commented 12 years ago

That's an interesting question. I don't think that per-site specifications would be particularly hard, but there's a a lot of Freeway functionality that wouldn't be hard but that I'm not keen on writing, testing (ugh), and working with the various "I installed Solspace Tags and now it broke" issues on. I'm curious: are either of you (Zac, QB) actually finding Freeway useful in a single-site context? Have you accomplished the things you wanted with it, outside of the MSM issue? Have you done things with Freeway that you can't do through other methods (embedding templates with conditionals, using Freebie, etc)?

MSM and EE both cost money, they're both a pain to install/upgrade, and neither come with tests that I can run alongside Freeway to verify that I'm not breaking some obscure functionality. I'm really hoping that, if Ellis Labs actually thinks routing is a valuable product feature, they work on integrating it directly with the product. At one point I believed that Ellis was working on a feature like this, but their privacy and slow release schedule make it difficult to know if this is true or not.

At the moment, keeping Freeway simple is my defense against dealing with the mountain of compatibility issues and quirky config options that the EE environment introduces, so unless I get a good sense that additional complexity provides value, I'm probably not going to make things more complex.

qbmarketing commented 12 years ago

I've not yet used it in a single site environment. I suspect there the issue would in fact be much simpler. It just so happens that my first need for template group name and template name "aliasing" reared its ugly head with an MSM site. So throwing domain.com at the front of a path in Freeway won't work? It's entirely relative?

averyvery commented 12 years ago

At the moment, Freeway parses the URI for information, and the URI is unrelated to the actual URL (domain included).

To introduce sites for all users, I would need to add and work from a new syntax, something like:

default_site {
  journals => blogs/
  journals/{{user}} => blogs/users/{{user}}
  product/{{product_id}}/{{action}} => catalog/product_lookup/id/{{product_id}}/{{action}}
}

french_site {
  novellas => 'news' 
}

Do you need Freeway to work on both sites? If not, you could probably modify the should_execute() method to include a quick site check (not sure how this would work off the top of my head; I don't have a copy of MSM and it doesn't seem to have documentation around how to get the site out with a var).

averyvery commented 12 years ago

Happy to announce that MSM support is coming up in the next release. You can check it out (along with some significant changes) here.

zgordon commented 12 years ago

Awesome man!!! That's great news :)

rmdort commented 12 years ago

This is great news Doug. I am using freeway on 3-live sites. Glad to know that it will be supporting MSM soon.