Warning: fread(): Length parameter must be greater than 0 in /home/platform/public_html/Caroline/concrete/libraries/3rdparty/Zend/Translate/Adapter/Gettext.php on line 49

Warning: fread(): Length parameter must be greater than 0 in /home/platform/public_html/Caroline/concrete/libraries/3rdparty/Zend/Translate/Adapter/Gettext.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/platform/public_html/Caroline/concrete/libraries/3rdparty/Zend/Translate/Adapter/Gettext.php:49) in /home/platform/public_html/Caroline/concrete/core/libraries/view.php on line 963
Plateforme test :: Navigation Supermint v2

création du header fixe v2

 

création du bouton ON/OFF

/single_pages/dashboard/theme_super_mint_options/theme_options.php 

array(
"name" => t("Fixed header"),
"desc" => t("test"),
"id" => "fixed_header",
"value"=>'options',
"activated" => false,
"type" => "toggle"
),

modification du php

dans le fichier header.php(themes/super_mint/elements)

ligne 2: référence à la variable $u : 

global $u

/****************************************************************/
ligne 45 : création du div :

<div id="conteneurMenu"> , ce div contient:

<div id="fixed-top">
<div id="top">

/***************************************************************/
ligne 75 : verifier si le bouton est à ON, appliquer les styles:

<?php if($o->__fixed_header) : ?>

<script>
   $(document).ready(function(){
      var nav_height = $("#conteneurMenu").height();
      $("#pagewrapper").css("padding-top",nav_height+"px");
   });
</script>
	
<style>#conteneurMenu{position: fixed;width:100%;z-index:2;}</style>

	<?php if($c->isEditMode ()) { ?> 
	<style>
           #conteneurMenu{top:50px;}
        </style>
	<?php } else { ?>
			<style>#conteneurMenu{z-index:10;}</style>
	      <?php if($u -> isLoggedIn ()) { ?>
			<style>#conteneurMenu{top:50px;}</style>
		  <?php } else { ?>
	        <style>#conteneurMenu{top:0px;}</style>
		  <?php }}  ?>
<?php endif ?>