Copied to clipboard

Flag this post as spam?

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


  • Berdia 45 posts 67 karma points
    Feb 05, 2011 @ 15:04
    Berdia
    0

    Problem with custom master page.

    Hi,

    I am trying to create a custom master page from Templates but every time I create a new template system automatically assigns default master page to it.

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

    If I remove it and click save it still comes up on next reload.

    Could you please let me know or direct to the tutorial how to set up custom master page?

    Thank you.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 05, 2011 @ 15:16
    Jan Skovgaard
    0

    Hi Berdia

    You are doing it right - this is a standard directive that needs to be in the template.

    Do you have any reasons why you don't want it to be there? What is it you are trying to achieve? :)

    /Jan

  • Berdia 45 posts 67 karma points
    Feb 05, 2011 @ 15:25
    Berdia
    0

    Hi Jan,

    Thank you for a quick reply!!!

    All I want to use basically is a MasterPage with my template. It does not matter whether it is a default one or a custom. Reason I went for a custom master page is because every time I try to use default one it gives an error saying "ContentPlaceHolderDefault" does not exist. But it is there.

    I am quite new with Umbraco. I then found a tutorial video how to create custom Master Page and it works there but not in my site.

    So I am little bit confused. Any recommendations and help will be greatly appreciated!

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 05, 2011 @ 16:12
    Jan Skovgaard
    0

    Hi Berdia

    Can you post the content of your template? I think it's easier to help you out if I can see how it's structured.

    Maybe you're refferencing a wrong ID or something.

    /Jan

  • Berdia 45 posts 67 karma points
    Feb 05, 2011 @ 16:24
    Berdia
    0

    Jan,

    I found the way how to use default.master page. I modified it in VS2010 and it is showing its content. Although, I inserted Menu control into it and it does not show when open my web site. Is there any problem with inserting ASP.NET menu control into Umbraco Master Pages?

    I think I am getting there but not quite there yet:) If you know what I mean.

    Now, I can see master page content but can't see my web page content.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 05, 2011 @ 16:34
    Jan Skovgaard
    0

    Hi Berdia

    I think I know what you mean and I'm happy you can see your content from the template.

    For navigation I don't use ASP.NET menu controls so I actually don't know If you can use those out of the box.

    Usually I'm using an XSLT macro to create my menu.

    To create the menu macro you need to go to the "developer section" in Umbraco, right click the XSLT folder and Write a name lige "navigation" or "menu" and from the dropdownbox below you can choose the "navigation prorotype". Hit the save button.

    Now in the "Settings" section you can insert the macro you just created into your template and you should see a menu on your site.

    To pull the content out from Umbraco you can use "umbraco:Item", which you insert in the templates using the editor in Umbraco. Right next to the blue "save" icon, there is an icon that display the text "insert umbraco page field", when you hold the mouser over it. Click this button. From here you can choose the properties, which content you want to have shown in your template.

    This should give you some content from Umbraco.

    Since you're very new to Umbraco I recommend that you take a look at the "Creative website starter" package, which is found in the "Developer" section. From here you choose the "packages" folder and go to the repository and choose the "Starter kits" category. Install this package and have a thourough look at how it's been built and play around with it. I think this could save you some headaches and give you a couple of revelations along the way :-)

    Hope this helps.

    /Jan

  • Berdia 45 posts 67 karma points
    Feb 05, 2011 @ 17:17
    Berdia
    0

    Jan,

    Thanks for a good tip. I installed it and I can see many things much clearer now.

    Appreciate your help!

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 05, 2011 @ 17:25
    Jan Skovgaard
    0

    Hi Berdia

    You're welcome. It can sometimes be pretty hard to crack the concepts when starting out. So the CWS package is a really nice study on how to use Umbraco :-)

    Don't hesitate to ask further questions when there is something you're in doubt about.

    Cheers.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft