Vijay Sutaria
Vijay Sutaria

Reputation: 132

Import asp.net and html pages in Umbraco CMS

I am new to Umbraco CMS. I have an existing website which is developed in asp and asp.net. Now I have requirement to convert this existing website to new website using Umbraco CMS.

The pages available in existing website are almost all static pages..

My question : Is there any way to import these static pages into my Umbraco website. So that I can skip the manual content creation of these pages in Umbraco.

Upvotes: 0

Views: 1381

Answers (2)

Ricardi Hamilton
Ricardi Hamilton

Reputation: 21

I did this before. Created a basic template / view with header and footer and main content area.

Then use Screaming Frog (or a similar tool) to crawl the site. Use the output of the page crawl to make a comma delimited list of Urls then use this to find each page. For each page, create an Umbraco page with the name of the url, ie /something-page-name = 'Something Page Name' Use HTML Agility pack to navigate the HTML and pull out key elements such as Title, Description etc and locate the main content by navigating the DOM and literally take the InnerHTML of that section into the content field of the Umrbaco page and save and publish it.

Make sure you allow your content editor in Umbraco to edit all the html elements found in the source page. Ie you may have section or small tags which the editor may not recognise.

Upvotes: 0

user2071645
user2071645

Reputation: 46

In short, it depends on how much you need to edit on the original pages and how many pages there are.

If the content is never going to be edited, then you can maybe create most as just normal masterpages (umbraco templates). You can then just add in Navigations and other CMS spec

Or another way of doing it would be to create 1 template and add a big text box to the DocType which you can then paste the HTML into. However this will mean you will end up with loads of HTML in the DB.

If you want to make it a 'true' Umbraco site and use as much of the CMS functionality as possible then there is no really easy way of converting HTML into an Umbraco site.

If the data was in a DB you could use CMSImport and map the old to the new DocType fields, but you would still probably have to do some HTMLTidy work on it before importing.

Depending on the amount of pages, the best and easiest way is usually to just copy and paste in my opinion because it allows you the chance to perform a content audit at the same time and clean up HTML where necessary.

Upvotes: 3

Related Questions