Copied to clipboard

Flag this post as spam?

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


  • dominik 711 posts 733 karma points
    Jan 12, 2011 @ 13:22
    dominik
    0

    css for templates (not master)

    Hello,

    Is it possible to add css files to specific templates.

    So this is what i want to do:

     

    The master template uses a global.css file

    A template (connected to the master template) uses a sub.css file

    This css file information should be included into the head section but this is inside the master template.

     

    How can I use different css files for different templates?

     

    Thanks

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jan 12, 2011 @ 13:24
    Ismail Mayat
    0

    dominik,

    you can do it the reverse way by using http://our.umbraco.org/projects/backoffice-extensions/cogworks-cogcsspickerdatatype on a document type and that i guess could have its own template?

    Regards

    Ismail

  • tentonipete 78 posts 223 karma points
    Jan 12, 2011 @ 13:40
    tentonipete
    3

    The easiest way to achieve this is to add a ContentPlaceHolder in the head of your master page

    <html>
    <head runat="server">
        <title>Untitled Page</title>
        ADD REGULAR STYLES HERE
        <asp:contentplaceholder ID="ExtraStyles" runat="server" />
    </head>
    <body>
        
    </body>
    </html>

    Then add the specific reference in the template page

    <asp:content ContentPlaceHolderID="ExtraStyles" runat="server">
      ADD EXTRA STYLES HERE
    </asp:content>

     

     

  • Eran Meir 401 posts 543 karma points
    Jan 12, 2011 @ 13:53
    Eran Meir
    0

    and if you're using Client dependency just use CssInclude in the template

     

  • 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.

Please Sign in or register to post replies