I am starting to build a new website, where i would like to have a member area that has a largely different design, though sharing some elements and styling.
Wouldn't that require that every doctype i want to use under the member section, has to be specific for the member section ?
So i couldn't use it on the "open" part.
You should be able to switch the master template / layout for your pages setting the layout using some conditional logic in the top of your templates.
So you have have two master templates like "Layout.cshtml" and "LayoutMember.cshtml".
I imagine that you will also need a "Home" document type, which has a "home.cshtml" template, which inherits the "Layout.cshtml". And you also have "Home Member", which has a "homeMember.cshtml" template, which inherits the "LayoutMember.cshtml".
Then let's say you have a textpage documenttype, which has the template "textpage.cshtml". In order to reuse the textpage under both master document types you can add some conditional logic like the following to decide, which layout should be used in your textpage.cshtml.
OBS: This is a pseudo code example, which might not be accurate in your context - It's copied from a solution where we have a custom "baseline", which is dealing with mapping of document types etc. differently than what you get out of the box with Umbraco - So no guarantee that the code can be copied directly - But it serves as an inspirational example on how to achieve reuse of document types.
Member area with different design
I am starting to build a new website, where i would like to have a member area that has a largely different design, though sharing some elements and styling.
I am planning on using this as the "open" part of the site: https://www.creative-tim.com/product/argon-design-system And expanding on it to better suit my needs.
And this dashboard as a member area: https://www.creative-tim.com/product/argon-dashboard
How would i go about having a totally new design ? the only thing shared between the two, would be some styling.
I know this a broad question, but i am not currently able to see how i could achieve this in a single umbraco installation.
I would love not having to make two.
Any resources or other people who have made it before i could get inspiration from ?
You could just create a different master template for the members portion of your site.
Wouldn't that require that every doctype i want to use under the member section, has to be specific for the member section ? So i couldn't use it on the "open" part.
Hi André
You should be able to switch the master template / layout for your pages setting the layout using some conditional logic in the top of your templates.
So you have have two master templates like "Layout.cshtml" and "LayoutMember.cshtml".
I imagine that you will also need a "Home" document type, which has a "home.cshtml" template, which inherits the "Layout.cshtml". And you also have "Home Member", which has a "homeMember.cshtml" template, which inherits the "LayoutMember.cshtml".
Then let's say you have a textpage documenttype, which has the template "textpage.cshtml". In order to reuse the textpage under both master document types you can add some conditional logic like the following to decide, which layout should be used in your textpage.cshtml.
OBS: This is a pseudo code example, which might not be accurate in your context - It's copied from a solution where we have a custom "baseline", which is dealing with mapping of document types etc. differently than what you get out of the box with Umbraco - So no guarantee that the code can be copied directly - But it serves as an inspirational example on how to achieve reuse of document types.
I hope this makes sense :)
/Jan
Cool, i believe this will work ! Thank you!
is working on a reply...