Ahojte
Som nový v Drupale 7, doteraz som písal kód od základu. Mám takýto problém:
Naštudoval som si nejakú dokumentáciu z
www.drupal.org a skúšam vytvoriť svoju prvú tému. Drupal mi stále vypisuje chyby:
Kód:
Notice: Undefined variable: head_title in include() (line 6 of /opt/
lampp/htdocs/drupal/sites/all/themes/earth/page.tpl.php).
Notice: Undefined variable: head in include() (line 8 of /opt/lampp/
htdocs/drupal/sites/all/themes/earth/page.tpl.php).
Notice: Undefined variable: styles in include() (line 9 of /opt/lampp/
htdocs/drupal/sites/all/themes/earth/page.tpl.php).
Notice: Undefined variable: scripts in include() (line 10 of /opt/
lampp/htdocs/drupal/sites/all/themes/earth/page.tpl.php).
Notice: Undefined variable: sidebar_left in include() (line 17 of /opt/
lampp/htdocs/drupal/sites/all/themes/earth/page.tpl.php).
Toto je môj info súbor:
Kód:
name = earth
description = téma earth
version = 0.1
core = 7.x
engine = phptemplate
stylesheets[all][] = css/style.css
php = 5
regions[menu] = "Menu"
regions[content] = "Hlavný obsah"
regions[left] = "Vľavo"
regions[right] = "Vpravo"
a toto je page.tpl.php
Kód:
<!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" xml:lang="sk" lang="sk">
<head>
<title>
<?php print $head_title; ?>
</title>
<?php print $head; ?>
<?php print $styles; ?>
<?php print $scripts ?>
</head>
<body>
<div id="wrapper">
<div id="header"></div>
<div id="menu"><?php print $sidebar_left; ?></div>
<div id="left">Stĺpec vľavo</div>
<div id="content">Obsah</div>
<div id="right">Stĺpec vpravo</div>
</div>
</body>
</html>
Prosím, čo mám spraviť, aby tie blbé premenné boli známe?