views:

97

answers:

2

I just finished installing SiteFinity 3.7 standard version on windows server 2008. Is there a way to entirely/partially import an already existing .NET project (ASP.NET) into SiteFinity with some minor changes in the code of course (may be by changinf a couple of xml files or something similar). I could only see an "export" under Administration->Tools section but no import. I am new to SiteFinity so a detailed help/guidance would be much appreciated.

Thanks.

+2  A: 

I think you're on your own here. Sitefinity stores everything in a database so you'll have to programmatically convert the sitemap (read XML insert into database). Sitefinity does have an API that allows you to do this. You can for example create pages and add controls to that page.

Sitefinity uses MasterPages as templates so that's easy. You can also re-use any controls you have.

But, by the time you're done writing the conversion code, I think you'll find that you could have done it all by hand in less time. Unless this is a huge website you need to convert.

Marnix van Valen
+2  A: 

if you just need to import the pages you can add them as "external pages". this allows you to set permissions, page properties, and add it to you navigation/sitemap but of course doesn't let you edit the page inside of sitefinity. I did this with some sites that were developed seperately but needed to be in our sitemap.

You could also wrap the content and code into user controls, then add those to the page. We did this for an application that we built. the pages had to live inside of sitefinity, but the programming was already done, and needed to be in user controls. Once again you don't get to edit the content in sitefinity, but you get to keep your existing code.

Finally, if you used any kind of content management system, you can easily import stuff like news/events/etc via the various managers, it works something like:

var mgr = new ContentManager("News");
var content = new mgr.CreateItem("text/html");
content.SetMetaData("Title", importedItem.Title)
...
mgr.SaveContent(content);

this isn't EXACTLY the code but it's something similar; you can use the api documentation to learn more.

If it's plain text, then unfortunately yes, you'll have to manually copy this into sitefinity. It is a bit of work, I did this with our hundreds of pages, but in the end it's worth it to have the cms benefits.

hope this was helpful!

Josh