Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Aug 2006
    Posts
    50
    Plugin Contributions
    0

    Default Adding IE conditional stylesheet

    ZC 1.3.5

    Could someone lend a dab of php expertise on adding a stylesheet that has a conditional into the header? I may about have it but for a syntax error...

    This stylesheet conditional works fine for me in other static sites I've done.
    <!--[if gte ie 5.5000]><link rel="stylesheet" type="text/css" href="css/stylesheet_ie.css" /><![endif]-->
    This is what I'm tryingwith the html_header.php file in my_custom common folder; note the closing tag for the conditional:

    /**
    * load all template-specific stylesheets, named like "style*.css", alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css');
    while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
    }

    /**
    * Special IE Overide -- load all template-specific stylesheets, named like "style*.css", alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'cssie'), '/^style/', '.css');
    while(list ($key, $value) = each($directory_array)) {
    echo '<!--[if gte ie 5.5000]><link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'cssie') . '/' . $value . '" />'."\n" . '<![endif]-->' .;
    }
    Last edited by oceano; 18 Sep 2006 at 05:35 PM.

 

 

Similar Threads

  1. Adding conditional code to emails
    By Scott_C in forum General Questions
    Replies: 7
    Last Post: 17 May 2010, 09:15 AM
  2. HowTo include an IE Conditional Comments stylesheet
    By joelfarris in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 Jun 2007, 02:33 AM
  3. conditional stylesheet
    By tomzo in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 25 Mar 2007, 08:03 PM
  4. Need the Zen-ese to call stylesheet through Conditional Comment
    By beejay in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 20 Dec 2006, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg