Copied to clipboard

Flag this post as spam?

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


  • Fred Ramsey 5 posts 25 karma points
    Sep 02, 2010 @ 19:33
    Fred Ramsey
    0

    Styling a custom section page

    I want to make a custom page in a section I have made look like the rest of the Umbraco UI. What is the best way to go about this? Is there CSS I can use? What is path to the style sheets should I use?

    Any help would be appreciated.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 02, 2010 @ 21:26
    Dirk De Grave
    1

    Hi Fred,

    Start by using /umbraco/masterpages/umbracoPage.Master as your master page for your own custom pages, as it will include the necessary css and script files for you. Take a peek at that file to know what files exactly. Also, make sure your custom page inherits from UmbracoEnsuredPage.

     

    Hope this helps for a start.

    Cheers,

    /Dirk

  • Ricky Beard 61 posts 116 karma points
    Sep 02, 2010 @ 21:59
    Ricky Beard
    0

    You can take a look at Tim's sample project which uses several Umbraco UI elements (panels, tabs, etc).

    http://www.nibble.be/?p=71

  • Rob Watkins 370 posts 702 karma points
    Mar 16, 2011 @ 11:40
    Rob Watkins
    0

    As a quick addition to this to help with searchability, I have been trying to find out what it is that does the simple "Welcome Administrator" UI element for a my custom section - the class you want is UmbracoPanel.

    So, here is a very basic custom section page to build from (this uses code behind for functionality, but could easily be in an assembly obviously):

    <%@ Page Language="C#" MasterPageFile="~/umbraco/masterpages/umbracoPage.Master" Inherits="MyApp.default_Page" Src="~/plugins/MyApp/code/default.cs" AutoEventWireup="True" %>
    <%@ Register TagPrefix="uui" Namespace="umbraco.uicontrols" Assembly="controls" %>
    <asp:Content ContentPlaceHolderID="body" runat="server">
    
    <uui:UmbracoPanel ID="MainPanel" Text='<%# "Welcome " + CurrentUser.Name %>' runat="server">
        <asp:Label runat="server">Hello world!</asp:Label>
    </uui:UmbracoPanel>
    
    </asp:Content>

    I don't think there is a way of making the title completely declarative - the above syntax requires you call DataBind() on the page in your code, or you could simply do MainPanel.Text = "Welcome " + CurrentUser.Name; 

    If anyone knows if you can get the DataBind done automatically that'd be handy.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies