Videotutorial zum Erstellen eines Template nach HTML Vorlage
Beispiel Template, bitte auf die Abhängigkeiten achten also nicht einfach so verwenden, da es dann nicht funktionieren würde.
Benötigt wird:
Dieses Template soll nur als Beispiel dienen.
Und wie immer ein fettes Dankeschön an alle Entwickler
<?php
// header als utf-8 senden
header('Content-Type: text/html; charset=UTF-8');
// session starten
session_start();
// auf deutsch stellen (zeit etc.)
setlocale (LC_ALL, 'de_DE');
// REXSeo
if(OOAddon::isAvailable('rexseo'))
{
$meta_description = rexseo::description();
$meta_keywords = rexseo::keywords();
$meta_title = rexseo::title();
$meta_canonical = rexseo::canonical();
$meta_base = rexseo::base();
}
else
{
$OOStartArticle = OOArticle::getArticleById($REX['START_ARTICLE_ID'], $REX['CUR_CLANG']);
$meta_description = $OOStartArticle->getValue("art_description");
$meta_keywords = $OOStartArticle->getValue("art_keywords");
if($this->getValue("art_description") != "")
$meta_description = htmlspecialchars($this->getValue("art_description"));
if($this->getValue("art_keywords") != "")
$meta_keywords = htmlspecialchars($this->getValue("art_keywords"));
$meta_title = $REX['SERVERNAME'].' | '.$this->getValue("name");
$meta_canonical = isset($_REQUEST['REQUEST_URI']) ? $_REQUEST['REQUEST_URI'] : '';
$meta_base = 'http://'.$_SERVER['HTTP_HOST'].'/';
}
// die variable $bg_body leeren
$bg_body = "";
// die variable $bg_body füllen mit daten aus dem metainfo addon
$bg_body = $this->getValue("art_file");
// wenn keine info hinterlegt ist ein standard bild verwenden
if($bg_body =="") $bg_body = "bg_body.png";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php // REXSeo ?>
<base href="<?php echo $meta_base; ?>" />
<title><?php echo $meta_title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<?php echo $meta_keywords; ?>" />
<meta name="description" content="<?php echo $meta_description; ?>" />
<link rel="canonical" href="<?php echo $meta_canonical; ?>" />
<?php // REXSeo ?>
<?php // externe css ?>
<link href="files/demo01_main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="files/shadowbox.css"/>
<link rel="shortcut icon" href="files/favicon.ico" type="image/x-icon" />
<link rel="icon" href="files/favicon.ico" type="image/x-icon" />
<?php // externe css ?>
<?php // externe javascripts ?>
<script src="files/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="files/shadowbox.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
Shadowbox.init({
slideshowDelay: "4",
animSequence: "sync"
});
/* ]]> */
</script>
<?php // externe javascripts ?>
</head>
<body style="background:#fff url(files/<?php print $bg_body;?>) no-repeat center top">
<div id="wrapper">
<!-- header -->
<div id="header">REX_TEMPLATE[5] REX_TEMPLATE[4]</div>
<!-- /header -->
<!-- top_nav -->
<div id="top_nav">
<?php $rexnav = rex_navigation::factory(); echo $rexnav->get(0,1,FALSE,TRUE); ?>
</div>
<!-- /top_nav -->
<!-- main_container -->
<div id="main_container">
<div id="main_seitebar">
<?php $P = explode("|",$this->getValue("path").$this->getValue("article_id")."|"); $rexnav = rex_navigation::factory(); echo $rexnav->get($P[1],3,TRUE,TRUE); ?>
REX_ARTICLE[ctype=2] </div>
<div id="main_content">REX_ARTICLE[ctype=1]</div>
</div>
<!-- /main_container -->
<div class="clear"></div>
<!-- footer -->
<div id="footer">REX_ARTICLE[3]</div>
<!-- /footer -->
</div>
<!-- /wrapper -->
</body>
</html>
Nüztzliche Links