|
Rank: Newbie Groups: Member
Joined: 3/12/2009 Posts: 7 Points: 21
|
I'm trying to figure out how to have multiple Cuyahoga sites with the same domain name. i.e. have these load two different sites: http://www.mydomain.com/site1http://www.mydomain.com/site2Right now that just throws an exception when loading the site: NHibernate.NonUniqueResultException: query did not return a unique result: 2 After some looking around, it looks like the only way to change that is to modify the Core and Web projects (SiteService for site lookup, and UrlHelper.GetSiteUrl to return more than just the base domain), but I'm not sure what other issues might spring up once I do that. I could also try creating my own SiteService and inject it with Windsor container, but I'm not too sure what that would lead to. Has anyone else had any experience with this? Any feedback would be much appreciated! Thanks, Ben
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
Use subdomains or different domain names altogether, they both work. I have multiple sites like this: 1) Log into your admin. 2) Click add a new site. 3) Give your site a name and in the 'Site url (incl. http://)' box add the address of your site (eg http://site1.mydomain.com). You can test locally by adding a new virtual directory that points to Cuyhoga. 4) Add nodes and sections etc... This works for me. I have also added site specific templates, file uploads (for FCK also) and users etc. Hope this helps.
|
|
Rank: Administration Groups: Administration
, Member
Joined: 12/30/2004 Posts: 1,674 Points: 1,824 Location: Wageningen (NL)
|
Create two virtual directories that point to the same Cuyahoga installation and then create two sites in the admin that point to the virtual directories. You also have to include the virtual directory name in the site url, otherwise you'l get the duplicates error.
|
|
Rank: Administration Groups: Administration
, Member
Joined: 12/30/2004 Posts: 1,674 Points: 1,824 Location: Wageningen (NL)
|
Constructor wrote:Use subdomains or different domain names altogether, they both work.
Virtual directories only also does the trick. Quote: This works for me. I have also added site specific templates, file uploads (for FCK also) and users etc.
A little offtopic, but this is also new functionality in Cuyahoga 2.0
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
martijnb wrote:A little offtopic, but this is also new functionality in Cuyahoga 2.0 I though that would be where it was going. I am really looking forward to moving to it. I have had a look at the trunk version. There is another feature I am looking at. The possibility of using either '.hbm.xml' files or Fluent configuration and mapping. I have had a few tests working but still have yet to decide the best way to do it. There is the option for using just Fluent (as this is what I want to use) but it is better to have the choice. Again, apologies for being off topic! But if any advice you could give ( a post exists here).
|
|
Rank: Newbie Groups: Member
Joined: 3/12/2009 Posts: 7 Points: 21
|
Thanks for all the help guys, I really appreciate it! I'm also glad I don't have to modify the Core project...
p.s. I'm REALLYY excited about the changes for 2.0, but I haven't gotten a chance to play with it yet. Hopefully soon! MVC, Fluent NHibernate, and LINQ to NHibermate are high on my list of things to try...
|
|
Guest |