0

I am developing an MVC4 public facing website which should have a blog, I didn't want to develop one from scratch so I got a nice open source one from codeplex.

Herein lies the problem: I have to integrate this into the site I am building, I can't have a random link sending the user off to a separate blog site as I have to display sections from the blog on my original site.

I thought about using Areas which I will give a go after posting this but I was interested in knowing if there is a better way to do this or caveats that i need to be aware of etc.

Thanls for all the help :)

tereško
  • 58,060
  • 25
  • 98
  • 150
Obi
  • 3,091
  • 4
  • 34
  • 56

1 Answers1

0

So I managed to do this with a bit of tinkering.

First I added the source code projects to my solution. Then I created an area called Blog and deleted all of the boilerplate stuff except BlogAreaRegistration.cs. I then looked at the References and referenced all corresponding libraries as well as the accompanying class library projects.

I copied all the folders except App_Data, Content and Scripts into Areas/Blog. Copied the previously mentioned folders to their respective locations in the root website.

I then compared both Global.asax's and web.configs, copied across the missing sections into my own files (not without the help of Examdiff for the configs).

I then had to copy the default ViewTemplates from the Areas/Blog/Views directory to the root Views Folder.

...press F5 and voila!

Ofcourse I make it sound like a disney fairytale bbut it was alot more difficult with lots of trial and error (of a yellow screen of death kind).

Well, that's my 2 cents just incase anyone else runs into the same murky waters in the future

Obi
  • 3,091
  • 4
  • 34
  • 56