Copied to clipboard

Flag this post as spam?

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


  • Jerry 23 posts 73 karma points
    Jan 05, 2013 @ 22:58
    Jerry
    0

    the template coding

    Hi all,

     i  am very new to umbraco, i look at the runway kit's master template, 

    at the end it has 

    <script type="text/C#" runat="server">

    protected void Page_Load(object sender, EventArgs e)

    {

        umbraco.library.AddJquery();

        umbraco.library.RegisterJavaScriptFile("jquery.placeholder.js", "/scripts/Designit_Green/jquery.placeholder.js");

        umbraco.library.RegisterJavaScriptFile("Designit_Green.js", "/scripts/Designit_Green/Designit_Green.js");

    }

    </script>

    i have no idea what is that for? i mean the placeholder.js, is that needed?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 05, 2013 @ 23:45
    Jan Skovgaard
    0

    Hi Jerry and welcome to our :)

    What happens above is that some inline C# is being used to register/add jquery to the site and the two other scripts, jquery.placeholder and Designit_Green.js - I asume that the jquery.placeholder script is perhaps a fallback so old browsers like IE9 and below can have a nie placeholder effect, which is know comon i most modern browsers like chrome, firefox, safari and IE10.

    I must admit that it seems a bit cumbersome to do it this way rather than simply just referencing the files using a <script> tag pointing either at the ressource online or on disk.

    But perhaps this has to do with the concept of "Skinning" in Umbraco...I must admit that I don't know much about this part and I don't really think that many people have embraced this option. But it's great for starter kits and get people "going".

    I hope the above explanation makes sense!

    Have you worked with other CMS's before? And are you a backend or frontend developer?

    Looking forward to hearing from you.

    /Jan

  • Jerry 23 posts 73 karma points
    Jan 06, 2013 @ 06:32
    Jerry
    100

    Hi Jan thank you for your help, i do use to use wordpress or bulid my own website with smarty, since technology change every day, so just try to catch up.

    i see ...

  • 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