Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • DaveJ 3 posts 24 karma points
    Jan 06, 2014 @ 13:34
    DaveJ
    0

    Setting masterpage

    Hello,

    I am completely new to Umbraco CMS. Up to now I have created an empty asp neet solution in Visual Studio and added the Umbraco CMS Nuget package and configured it successfully.

    Firstly,what I am trying to work out is how this solution is working, what is the default start page/document? Where would I set a break point to see the process start. What I am trying to do is find the default file default.aspx for example and give it a master page. I tried this with the default.aspx that was created in the solution and added a basic master page to it but it did not appeart to anything.

    If I am completely getting the wrong end of it please advise.

    Many thanks, 

    Dave.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jan 06, 2014 @ 14:39
    Dennis Aaen
    0

    Hi Dave and welcome to our,

    Umbraco 7 has the rendering engine set to Mvc as defealt, therefor you need to do some changes to your Masterpages and then use views or Partial views. If you want to use Webforms it can be done, by changing the rendering engine WebForms see documentation here: http://our.umbraco.org/documentation/reference/Templating/Mvc/

    I would definitely recommend you to setup another empty umbraco installation and then install this starterkit, this is a good way to learn the system. I use that method myself when I learned to work with Umbraco,

    Another good starting points could be:

    http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/

    Point to the basic stuff in Umbraco

    http://our.umbraco.org/documentation/reference/Templating/Mvc/

    http://our.umbraco.org/Documentation/Using-Umbraco/Backoffice-Overview/Document-Types/index

    http://our.umbraco.org/documentation/Reference/Templating/managing-templates

    There is also lots of good video toturials to learn how to work with Umbraco, but you need to sign up for it to see them. But I can also recommend you to do this.

    http://umbraco.tv/videos/implementor/

    I hope this can help you learning Umbraco, happy Umbraco coding.

    /Dennis

  • DaveJ 3 posts 24 karma points
    Jan 06, 2014 @ 15:22
    DaveJ
    0

    Hi Dennis,

    Many thanks for your reply, I am going to read through the links you have provided now.

    I did change the defaultRenderingEngine to WebFormsin the umbracoSettings file but in the admin site the template code was empty.

    Not sure with Umbraco being built with MVC if it is a good idea trying to hold on to ASP.NET Forms technology such as Master Pages would you agree?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jan 06, 2014 @ 21:38
    Dennis Aaen
    0

    Hi Dave,

    I haven´t worked with views or partial views myself, and you can definitely work with Umbraco, by using WebForms. When you have change it in UmbracoSettings.config maybe you need to recycle the IIS, to make sure that the changes have taken effect.

    <%@ MasterLanguage="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">

    </asp:Content>

    You can see it has taken effect by creating a Master page from the Umbraco backoffice, when have done that you should see something like this:

    I will recommend you to create all scripting files such as XSLT, or Razor files and Master pages in the Umbraco backoffice so they are registred in the Umbraco database correctly. After you have done, the creation of the files you can work with them in Visual Studio or another editor of your choise.

    I will also recommend you use a master template. the thing about a master template is the other templates can inherite from the master template( A normal master page). So in the master template you will add all common elements that should be on all pages. Under this master template you will add the templates that are different from each other,

    Here is a example of an master template from one of my sites.

    - Master,master

        - Frontpage.master

        - Textpage.master

    You can benefit from using the same setup when you create your documentypes. By creating a master document type which, contains all the fields which are the same for all pages.and the other document types must then inherit from this master document type and contain the special fields for each page.

    When you are coming to get data out of the system, you can do it in different ways. You can get data out of Umbraco by using XSLT or Razor. Remember if you choose to use XSLT, it´s new XML schema, it was implemted from Umbraco 4.5

    I hope this post make sense to you. If you have any questions related to this topic keep asking in here and I will try to help you. If you have questions to other parts of Umbraco just create a new topic in the forum, and try to describe your question or problem the best you can. If it´s possible it will be a good idea to show your code if you have any. By doing this it will become more easy to help.

    /Dennis

  • DaveJ 3 posts 24 karma points
    Jan 07, 2014 @ 09:47
    DaveJ
    1

    Hi Dennis,

    That makes perfect sense and I didn't recycle IIS in my earlier experiments so it could have just that. What I have noticed is the the starter kit site that you get is set as a WebForms site so I am playinfg with that at the moment.

    Master template does seem the best way to take advantage of inheritence. 

    Anyway just wanted to say a big thank you for taking the time and effort for posting and helping me out.

Please Sign in or register to post replies

Write your reply to:

Draft