Announcement

Collapse
No announcement yet.

Newsletter integration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Newsletter integration

    Hi Do I need to create a new layout if I want to place html into my header area for my newsletter signup
    Code below.

    <!-- Begin MailChimp Signup Form -->
    <link href="//cdn-images.mailchimp.com/embedcode/classic-081711.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:350px;}
    /* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
    We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
    </style>
    <div id="mc_embed_signup">
    <form action="//ukcurtainpoles.us8.list-manage.com/subscribe/post?u=f583c78f17ea325f22a805be7&amp;id=dda721acfd" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
    <h2>Receive our Newsletter</h2>
    <div class="mc-field-group">
    <label for="mce-EMAIL">Email Address </label>
    <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div id="mce-responses" class="clear">
    <div class="response" id="mce-error-response" style="display:none"></div>
    <div class="response" id="mce-success-response" style="display:none"></div>
    </div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
    <div style="position: absolute; left: -5000px;"><input type="text" name="b_f583c78f17ea325f22a805be7_dda721acfd" tabindex="-1" value=""></div>
    <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
    </form>
    </div>
    <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script>
    <script type='text/javascript'>
    (function($) {
    window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';
    }(jQuery));
    var $mcj = jQuery.noConflict(true);
    </script>
    <!--End mc_embed_signup-->

    Many thanks for any help.

    Jo
    Thank you
    Kind regards
    Joanne

    www.ukcurtainpoles.co.uk

    #2
    No you don't need to create a new layout. The header is the top of the HTML where the Javascripts are before the </head> tag, the rest of the code below the <body> tag within other tags such as a sidebar. Also because the code uses Javascript with a // source URL you should change the .js to %2Ejs to fix a problem with thanks to Norman from this topic or it may not work on the home page.
    Peblaco

    Comment


      #3
      Hi
      Thank you for your reply.

      I have now decided not to put this in my header area but I am including it on a html page I am trying to create on my home page.

      Would you recommend that I place the html on a single fragment or create a new layout?

      Sorry for the change in direction!
      Thank you
      Kind regards
      Joanne

      www.ukcurtainpoles.co.uk

      Comment


        #4
        The code suggests it should be separated. CSS and Javascript in the middle of a page would probably work but not compliant.
        Peblaco

        Comment


          #5
          Thank you.
          I will bear in mind the js adjustment.

          I would prefer it to be complying to web standards so I probably wont use the fragments then.

          Would you recommend me to create a new layout and add the html in it?
          I will add the styling to the css

          I am trying to code the centre of my home page myself so it is taking me a while as I am a beginner.
          Thank you
          Kind regards
          Joanne

          www.ukcurtainpoles.co.uk

          Comment


            #6
            Code:
            <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script>
            <script type='text/javascript'>
            (function($) {
            window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';
            }(jQuery));
            var $mcj = jQuery.noConflict(true);
            </script>
            Do I put this script code in the head too?
            Thank you
            Kind regards
            Joanne

            www.ukcurtainpoles.co.uk

            Comment


              #7
              It does not specify to, you could leave that script code where it is and it should work. However note you should change the .js to %2Ejs as advised.
              Peblaco

              Comment

              Working...
              X