I am currently looking at a project which involves migrating an existing website into Umbraco. I’m quite conformable with the content migration side of the project; however a large part of the existing website is a complex member portal which I would like to export as is and “wrap” with Umbraco.
I’m quite new to Umbraco, I’ve had a look over the community for similar questions so please forgive me if this has been covered before!
This is what I would like to do:
From the existing website, copy the components for the MemberPortal into a sub folder of the Umbraco site “MemberPortal”.
Tell Umbraco to not handle requests past ~/MemberPortal.
Change the MemberPortal pages to use the Umbraco website mater pages to inherit the look and feel of the cms site.
Item 3 is my biggest concern. As the MasterPages will be using Umbraco controls, will they still continue to work (or fail gracefully) when they are loaded outside of an umbraco context?
I know items which require a reference to the current Umbraco page are not going to work, however will I still be able to generate navigation elements (From CMS content) and such like in these templates?
Potentially, I might consider setting up the MemberProfile folder as a virtual directory so I can keep the Umbraco site a little cleaner (although I recall seeing somewhere that Umbraco and VD’s don’t mix well?)
I’d appreciate any advice on this topic and/or any pointers or warnings about other areas of the integration I may not have considered.
I have never done this, but my guess for Item3 is that
it will indeed "fail gracefully": the umbraco elements are just tags that
will be ignored as "unknown tag" when outside the Umbraco context. The
only issue you might have is if you explicitely access thoses Umbraco
elements from your MasterPage codebehind page, because then those
objects will be unknown.
As for creating navigation elements etc. from CMS content into those
pages, it should normally be possible as long as you have references to the umbraco libraries, although maybe a little more
complex to implement (it depends on what you want to do).
Essentially the problem is that within a XSLT macro, when there is no umbraco context (i.e on a static page) there are no xml bindings to the document or the current page variable.
To get around this, I was able to call the XSLT extension method "umbraco.library.GetXMLAll()" and read in the site content into a variable which I then passed to the xslt templates for processing.
Im not sure I particullary like the approach - it works, but need to look into it further before Id be happy to scale it up to a real site.
Be great to hear how you get on if you persue this!
Can I take a look at that code? If I can see it, it may open my eyes to other possibilities. my e-mail is [email protected] I was going to take the day today an write an ASCX that can read an ASPX page and pass the HTML into Umbraco. Unfortunatly I know doing it this way will fall apart if the page has any post-back controls. Else I was thinking of opening the Unbraco source to find out why it can't be a shell for fixed aspx pages.
Using Umbraco MasterPages on non Umbraco page
Hi All,
I am currently looking at a project which involves migrating an existing website into Umbraco. I’m quite conformable with the content migration side of the project; however a large part of the existing website is a complex member portal which I would like to export as is and “wrap” with Umbraco.
I’m quite new to Umbraco, I’ve had a look over the community for similar questions so please forgive me if this has been covered before!
This is what I would like to do:
Item 3 is my biggest concern. As the MasterPages will be using Umbraco controls, will they still continue to work (or fail gracefully) when they are loaded outside of an umbraco context?
I know items which require a reference to the current Umbraco page are not going to work, however will I still be able to generate navigation elements (From CMS content) and such like in these templates?
Potentially, I might consider setting up the MemberProfile folder as a virtual directory so I can keep the Umbraco site a little cleaner (although I recall seeing somewhere that Umbraco and VD’s don’t mix well?)
I’d appreciate any advice on this topic and/or any pointers or warnings about other areas of the integration I may not have considered.
Many Thanks,
Adam
Hi Adam,
I have never done this, but my guess for Item3 is that it will indeed "fail gracefully": the umbraco elements are just tags that will be ignored as "unknown tag" when outside the Umbraco context. The only issue you might have is if you explicitely access thoses Umbraco elements from your MasterPage codebehind page, because then those objects will be unknown.
As for creating navigation elements etc. from CMS content into those pages, it should normally be possible as long as you have references to the umbraco libraries, although maybe a little more complex to implement (it depends on what you want to do).
Hope this gave you some indications :-)
Cheers,
Michael.
Thanks mike,
I have just tried a simple test.
I have a blank 4.6.1 website from which I have installed the standard starter kit and applied the business theme.
I have added a test.aspx to the root which simple contains:
Then in the web.config I have added to the umbracoReservedUrls setting test.aspx.
When I request the page, I get the famous "Object not set to an instance of an object" error.
I know the template is using macros referring to current page, however I was hoping this would have failed a little more gracefully :/
Hi Adam,
Can you put an extracte of your web.config part for umbracoReservedUrl? Dis you put "test.aspx" or "~/test.aspx"?
Cheers,
Michael.
I've used ~/test.aspx
A quick update, I have created a simple template for use by the static file in Umbraco:
It uses items from the Umraco website context, however I believe there should be no dependancy on the current page with these items.
Unfortunailty, I am still recieving the same error as above.
Adam -
Were you ever able to get regular aspx page to work with an umbraco masterpage?
I want to do the same thing... Have umbraco handle the navigation for all my legacy aspx pages.
Hi Jeff,
I did but only from a POC/playing around.
Essentially the problem is that within a XSLT macro, when there is no umbraco context (i.e on a static page) there are no xml bindings to the document or the current page variable.
To get around this, I was able to call the XSLT extension method "umbraco.library.GetXMLAll()" and read in the site content into a variable which I then passed to the xslt templates for processing.
Im not sure I particullary like the approach - it works, but need to look into it further before Id be happy to scale it up to a real site.
Be great to hear how you get on if you persue this!
Can I take a look at that code? If I can see it, it may open my eyes to other possibilities. my e-mail is [email protected]
I was going to take the day today an write an ASCX that can read an ASPX page and pass the HTML into Umbraco. Unfortunatly I know doing it this way will fall apart if the page has any post-back controls. Else I was thinking of opening the Unbraco source to find out why it can't be a shell for fixed aspx pages.
is working on a reply...