Announcement

Collapse
No announcement yet.

Pvii magic menu IE conditional coments

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

    Pvii magic menu IE conditional coments

    Have used the highly recommended magic menu to load a navigation menu onto v7.06. Although the IE conditional comments are in the appropriate template they do not appear of the pages on the website

    www.sasproducts.com
    --------------------------------------------------------------------------------

    Crofter Internet Ltd - www.Crofter.com

    --------------------------------------------------------------------------------

    #2
    Just for your guidance the comments are:

    <!--[if lte IE 6]><style>#p7PMnav a{height:1em;}#p7PMnav li{height:1em;float:left;clear:both;width:100%}</style><![endif]-->
    <!--[if IE 6]><style>#p7PMnav li{clear:none;}</style><![endif]-->
    --------------------------------------------------------------------------------

    Crofter Internet Ltd - www.Crofter.com

    --------------------------------------------------------------------------------

    Comment


      #3
      Actinic strips code between <!-- and --> from Templates when building pages.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman - so is there a work around?
        --------------------------------------------------------------------------------

        Crofter Internet Ltd - www.Crofter.com

        --------------------------------------------------------------------------------

        Comment


          #5
          I can't think of one. Except to investigate areas where <!-- are left in. E.g. between <script> and </script>

          And, of course, turn of Compact HTML/CGI (Design / Options / Misc) but that makes your pages much bigger.
          Last edited by NormanRouxel; 19-May-2006, 01:39 PM. Reason: Added more wise words.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Offering different style sheets to IE7 and FireFox

            We are just about to implement a similar approach which will enable us to offer different CSS style sheets to IE (including V7) and non-IE browsers (primarily FF) to cope with differences in the browsers' handling of CSS rules. Instead of using "Downlevel-hidden Conditional Comments" which are stripped out by Actinic, we are using "Downlevel-revealed Conditional Comments" which typically take the form:

            <![if !IE 5]>
            <p>Please upgrade to Internet Explorer version 5.</p>
            <![endif]>

            These are not stripped out in the compact HTML process, and can be used to set a different active style sheet for non-IE browsers using initial links to a persistent sheet, a preferred sheet and one or more alternate sheets - this is a very similar process to offering visitors different sizes of text based on CSS, but in this case the "decision" is not made by the visitor, but by:

            <![if !IE]>
            <script language="JavaScript" type="text/JavaScript">
            setActiveStyleSheet('non-ie-css')
            </script>
            <![endif]>

            Two small downsides - needs Java, but then so does Actinic, and doesn't validate, but neither does Actinic.

            Chris

            PS I love Microsoft's names "downlevel etc" - this refers to "downlevel" browsers which is anything other than IE5 onwards. Incredibly, it has been suggested by others that FF and others should be described as "uplevel" not "downlevel", even with the arrival of IE7.......
            <div>
            <a href="http://www.aquazuro.co.uk/" target="_blank">Designer stainless steel accessories for home and business – www.Aquazuro.co.uk</a><br />
            </div>

            Comment


              #7
              relatively easy to fix and guaranteed to work though the actinic generator.
              you need to change the syntax to suit your own code but the trick is to split the code to fool actinic.
              so the required code is something like:
              Code:
              <!--[if IE]>;
              must be changed to:
              Code:
              <script language="javascript">
              document.write("\<\!--\[if IE\]\>");
              </script>
              the point being to use the document.write, and the "\<" to generate the "<" and so on.
              the actual generated code is still correct and it slips through the actinic generator.

              using this method will work for just about any code.

              of course at the end of the conditional code you need a
              Code:
              <script language="javascript">
              document.write("\<\!\[endif\]\-\-\>");
              </script>
              to do the biz

              Comment


                #8
                Have just tried this in v8.5.1HFUA, and it works OK for IE, but outputs the <!--[if IE]> (unclosed comment) in Firefox 2.

                Can this be avoided?
                adaptive-image.co.uk

                Comment


                  #9
                  Have you tried Chris's solution - I think it's simpler and it works for us

                  Aquazuro - designer stainless steel accessories

                  Comment


                    #10
                    Thanks Mark (and Chris)

                    Have just implemented this, and it works a treat - apart from screwing up Dreamweaver by killing the main css file. Have tried DW hide at design time on the CSS file I'm including via the conditional, so it's not that, must be the format of the "downlevel" (ha-ha) revealed comment, that DW MX doesn't like. Not too bothered, I can live with that. Actinic's happy, IE5, 6, 7 and FF are happy - I'm happy!


                    Ignore the bit in grey italics - my mistake, had lost my standard css link thorugh sheer stupidity - it works a treat


                    Cheers, Dan
                    adaptive-image.co.uk

                    Comment


                      #11
                      Good to hear that you're all happy

                      We added all this coding to the HTML templates (ie the Act_Primarys etc) and created the style sheets directly in DW (8 I think), so I don't think that DW has the problem - might be more to do with the integration with V8, but we have stuck with V7 so I can't comment.

                      Aquazuro - designer stainless steel accessories

                      Comment

                      Working...
                      X