Je souhaiterai, pour un meilleur référencement, avoir un titre de page différent sur chacune d'entre elle. Dans mon header, qui est appelé sur toutes les pages, j'ai bien la balise <title>Titre</title>
Je me doute qu'il faille utilisé $_SERVER['REQUEST_URI'] et avoir quelque chose du type <title> <? echo "Titre" ?> </title> mais je n'arrive pas à l'utiliser correctement et ça me plante tout le site...
Quelqu'un aurait une idée?
Voici mon header.php:
<?php
header( 'content-type: text/html; charset=utf-8' );
// ###########################################################
// INDICA L'ID DELLA GALLERIA CONTENENTE LA COLLEZIONE ATTUALE
// ATTUALMENTE = 8 - Collection Printemps/Été 2011
$current_collection_id = 6;
// INDICA L'ID DELLE GALLERIE CONTENENTI LE VARIE CATEGORIE
// ATTUALMENTE = Homme, Femme, Garçon, Petite Fille
$current_subcategories = array(2,3,13,10);
// INDICA L'ID DELLA GALLERIA CHE CONTIENE L'ALBUM PER LA HOME PAGE
// (SOLO IL PRIMO ALBUM VIENE PRESO IN CONSIDERAZIONE)
$home_gallery_id = 6;
// ATTENZIONE = RICORDARE DI COMMENTARE LA LINEA RELATIVA ALLA
// CACHE DI DIRECTOR PRIMA DI FARE MODIFICHE AL CODICE :
// NEL FILE "api_director.php"
// ###########################################################
$monUrl = $_SERVER['REQUEST_URI'];
$monQs = $_SERVER['QUERY_STRING'];
include("language.php");
include("director_api.php");
// TROVA IL NOME DELLA COLLEZIONE GENERALE (STAGIONE E ANNO: es. "PRINTEMPS/ETE 2011")
$frC = "";
$enC = "";
$euC = "";
$current_collection = $director->gallery->get($current_collection_id);
$current_collection_name = parse_str($current_collection->name);
$fr_slogan="<p><i>Espadrille Soka, fabrication basque, cousu main</i></p>";
$en_slogan="<p><i>Sneaker Soka, Basque manufacturing, hand-sewn</i></p>";
$eu_slogan="<p><i>Espartina Soka, Euskal fabrikazio, esku-josi</i></p>";
$titre_page_index_fr="Soka Espadrilles - Fabrication cousu main - Pays Basque, chic et tendance revisité, Boutiques Toulouse, Paris, Bilbao, Lekeitio";
$titre_page_index_en="Soka Espadrilles - Fabrication cousu main - Pays Basque, chic et tendance revisité, Boutiques Toulouse, Paris, Bilbao, Lekeitio";
$titre_page_index_eu="Soka Espadrilles - Fabrication cousu main - Pays Basque, chic et tendance revisité, Boutiques Toulouse, Paris, Bilbao, Lekeitio";
?>
<!--TEST-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo $codeLanguage; ?> xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo $titre_page_index_fr; ?></title>
<link href="favicon.ico" rel="icon" />
<meta name="Description" content="Soka propose des espadrilles basques, cousues à la main, des espadrilles compensées pour les femmes, des espadrilles pour les hommes en cuir et coton à Biarritz, Bayonne, Saint Jean de Luz, Bordeaux, Paris, sur Espaldea.com et SSENSE" />
<meta name="keywords" content="Soka, espadrilles, cousu main, Pays Basque, Toulouse, Bilbao, Lekeitio, Paris, Biarritz, boutiques, chic, tendance, élégante, traditionnelle, femme, homme, enfants, petits garçons, petites filles, alpargatas, Authentic, hand-made, French, espadrille" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.tools.min.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#accordion").tabs("#accordion div.pane", {tabs: 'p.mag_city', effect: 'fade', initialIndex: null});
$("#chained").scrollable({circular: true, mousewheel: false}).navigator().autoscroll({
autoplay: true,
interval: 3000
});
// ## Tooltip ##
// initialize tooltip
$("a img.icon[title]").tooltip({
// tweak the position
offset: [50, 2],
// use the "slide" effect
effect: 'slide'
// add dynamic plugin with optional configuration for bottom edge
}).dynamic({ bottom: { direction: 'down', bounce: true }
});
$("span.colorbox[title]").tooltip({
// the tooltip class
tipClass: 'tooltip_small',
// tweak the position
offset: [5, 2],
// use the "slide" effect
effect: 'slide'
// add dynamic plugin with optional configuration for bottom edge
}).dynamic({ bottom: { direction: 'down', bounce: true }
});
});
//]]>
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29495792-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<!--FIN TEST -->
<body>
<div class="container">
<!-- ### HEADER ###-->
<div id="header">
<div id="header_left">
<div id="logo_soka"><a href="index.php"></a></div>
<div class="slogan_fr">
<?php if ($_SESSION['l'] == "fr") {
echo $fr_slogan;
} else if ($_SESSION['l'] == "en") {
echo $en_slogan;
} else if ($_SESSION['l'] == "eu") {
echo $eu_slogan;
}
?>
</div>
</div>
<div id="header_right">
<div id="lang_bar"> <a href="index.php?l=fr" <?php if ($_SESSION['l'] == "fr") { echo 'class="selected"'; } ?>>Français</a> - <a href="index.php?l=en" <?php if ($_SESSION['l'] == "en") { echo 'class="selected"'; } ?>>English</a> - <a href="index.php?l=eu" <?php if ($_SESSION['l'] == "eu") { echo 'class="selected"'; } ?>>Euskara</a> </div>
</div>
</div>
<!-- ### END HEADER ### -->
<div class="clear" style="height:35px"></div>
<!-- ### BODYPAGE ### -->
<div id="bodypage">
<div id="bodypage_left">
<?php include("menu.php"); ?>
</div>
<div id="bodypage_right">
<div id="gallery_container">
<!-- ### END HEADER ### -->
Merci.