Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: HTML CSS Javascript

  1. #1
    cesmendez is offline Junior Member
    Join Date
    Jan 2012
    Posts
    3

    Default HTML CSS Javascript

    I'm trying to insert a js snippet right after the head tag on the template.master file. The way that the site renders, it overlooks the script and places the css files before the script. How can I get this to come before.

    This is the code from the template master:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <!-- MOBIFY - DO NOT ALTER - PASTE IMMEDIATELY AFTER OPENING HEAD TAG -->
    <script type="text/javascript">/SCRIPT HERE</script>
    <!-- END MOBIFY -->

    This is how the page gets created
    <head id="ctl00_Head1"><link href="App_Themes/Skin_2/lightbox.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Skin_2/prettyPhoto.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Skin_2/reset.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Skin_2/style.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Skin_2/stylequirk.css" type="text/css" rel="stylesheet" />
    <!-- MOBIFY - DO NOT ALTER - PASTE IMMEDIATELY AFTER OPENING HEAD TAG -->
    <script type="text/javascript">/</script>
    <!-- END MOBIFY -->

  2. #2
    ccoddington is offline Junior Member
    Join Date
    Aug 2010
    Posts
    23

    Default

    The simple answer is to pull the CSS out of the themes folder and put it in another folder outside of the themes folder and reference it manually.

    Another approach you may want to consider is the following:

    1. Remove your JS and CSS references.
    2. Create a new topic.
    3. Place your JS and CSS references in the body of the topic.
    4. Add a topic control to the head of your master page or your template control (based on your version) and reference your newly created topic.

    Now whenever you want to add css or js to the head declaratively, you can do it via the admin.
    Chris Coddington
    Aydus Consulting
    Office: 800-419-0391 x303
    Direct: 213-785-8201
    Mobile: 818-675-1066
    Skype: Chris.Coddington
    chris@aydus.com
    www.aydus.com