<!DOCTYPE html> <html lang="pl"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""/> <link rel="stylesheet" type="text/css" media="all" href="{$template}/css/style.css"/> <link rel="stylesheet" type="text/css" media="all" href="{$template}/css/forum.min.css"/> <meta name="generator" content="Net4Engine 1.0 Alfa"/> <link rel='canonical' href='{$engine->domain}'/> <link rel='shortlink' href='{$engine->domain}'/> <link rel="stylesheet" type="text/css" media="all" href="{$template}/css/camera.css"/> <link rel='stylesheet' id='flexslider-css' href='{$template}/css/flexslider.min.css?ver=2.2.0' type='text/css' media='all'/> <link rel='stylesheet' id='owl-carousel-css' href='{$template}/css/owl.carousel.css?ver=1.24' type='text/css' media='all'/> <link rel='stylesheet' id='owl-theme-css' href='{$template}/css/owl.theme.css?ver=1.24' type='text/css' media='all'/> <link rel='stylesheet' id='font-awesome-css' href='{$template}/css/font-awesome.min.css?ver=3.2.1' type='text/css' media='all'/> <link rel='stylesheet' id='cherry-plugin-css' href='{$template}/css/cherry-plugin.min.css?ver=1.2.6' type='text/css' media='all'/> <link rel='stylesheet' id='contact-form-7-css' href='{$template}/css/styles.css?ver=4.1' type='text/css' media='all'/> <link rel='stylesheet' id='theme52906-css' href='{$template}/css/main-style.min.css' type='text/css' media='all'/> <link rel='stylesheet' id='magnific-popup-css' href='{$template}/css/magnific-popup.css?ver=0.9.3' type='text/css' media='all'/> <link rel='stylesheet' id='options_typography_Open+Sans-css' href='//fonts.googleapis.com/css?family=Open+Sans&subset=latin' type='text/css' media='all'/> {literal}<!--[if lt IE 8]> <div id="ie7-alert" style="width: 100%; text-align:center;"> <img src="http://tmbhtest.com/images/ie7.jpg" alt="Upgrade IE 7" width="640" height="344" border="0" usemap="#Map" /> <map name="Map" id="Map"><area shape="rect" coords="496,201,604,329" href="http://www.microsoft.com/windows/internet-explorer/default.aspx" target="_blank" alt="Download Interent Explorer" /><area shape="rect" coords="380,201,488,329" href="http://www.apple.com/safari/download/" target="_blank" alt="Download Apple Safari" /><area shape="rect" coords="268,202,376,330" href="http://www.opera.com/download/" target="_blank" alt="Download Opera" /><area shape="rect" coords="155,202,263,330" href="http://www.mozilla.com/" target="_blank" alt="Download Firefox" /><area shape="rect" coords="35,201,143,329" href="http://www.google.com/chrome" target="_blank" alt="Download Google Chrome" /> </map> </div> <![endif]--> <!--[if gte IE 9]> <script type="text/javascript"> jQuery(function(){ jQuery('.sf-menu').mobileMenu({defaultText: "Nawiguj do..."}); }); </script> <!--<![endif]--> {/literal} </head> <body class="home page page-id-203 page-template page-template-page-home page-template-page-home-php"> {include file="menu.tpl"}
i próbuję dodać linki do zmiennej co działa znakomicie. Chcę aby po dodaniu linka do zmiennej usuwał z headera link type="stylesheet" co powoduje mi już błąd. nie usuwa mi tego... a oto kod:
$header = $this->smarty->fetch('header.tpl'); $x = $y = 0; foreach ($links as $code) { $x++; $delete = $delete[0]; $url = $url[0]; if ($x == 1) $link = $url; else $link .= ",".$url; } $y++; }
nie mam pojęcia co robię nie tak...