Copied to clipboard

Flag this post as spam?

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


  • Zac 239 posts 541 karma points
    Jan 21, 2011 @ 18:30
    Zac
    0

    ClientDependency master child template question

    I have been working with ClientDependency to group together my CSS and js requests into fewer requests and was wondering how to do this with a master and child template.
    For example, if I have a master template that contains 2 global css files and 2 global js files and then a child template that has 2 css and 2 js files, how can I group these into 1 css and 1 js client dependency request while keeping the global files at the master level and the page files at the child level?

    I tried adding the <CD:CssInclude tag to both the master and child and only call the loader in one of the files (tried each master and child separately) but this didn't work.

    Can this be done?  If so, how do you do it? 

    Also, do you need to add a property to the CssInclude tag to enable compression / minification or is this automatic?

    Thanks!

    Zac

  • Zac 239 posts 541 karma points
    Jan 21, 2011 @ 18:34
    Zac
    0

    Nevermind about the compression / minification, this is working fine.

  • Zac 239 posts 541 karma points
    Jan 21, 2011 @ 18:40
    Zac
    0

    OK.  I figured this out.  For anyone who is interested, add the

    <CD:CssInclude tags in the master page in the head, and add the <CD:CssInclude tags in the child page into the head contentplaceholder and then call the Loader from the child page.  This works (I just had a bad reference in the child page previously which is why it didn't appear to work).

    Hope this helps someone else!

     

Please Sign in or register to post replies

Write your reply to:

Draft