Skip to content

Instantly share code, notes, and snippets.

@brunopulis
Created September 13, 2012 21:38
Show Gist options
  • Save brunopulis/3717878 to your computer and use it in GitHub Desktop.
Save brunopulis/3717878 to your computer and use it in GitHub Desktop.
Funcao que permite a criacao de meta tags para SEO de forma dinamica
<?php
/**
*
* Função que inseri dinamicamente meta-tags e title.
*
* @author Bruno Pulis <bruno.pulis@gmail.com>
* @version 1.0
* @copyright Creative Commons
*
*
*/
function checkPage($pag) {
$meta = array();
switch ( $pag ) {
case '/index.php':
$meta = array(
'title' => "",
'keyword' => "",
'description' => ""
);
break;
case '/institucional.php':
$meta = array(
'title' => "",
'keyword' => "",
'description' => ""
);
break;
case '/produtos.php':
$meta = array(
'title' => "",
'keyword' => "",
'description' => ""
);
break;
}
return $meta;
}
// Chamada da funcao
include("metaTagsDinamicas.php");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment