Processwire - Template from Scratch: Unterschied zwischen den Versionen
Aus Wikizone
| Zeile 19: | Zeile 19: | ||
* Markup Simple Navigation Modul installieren (Klassenname: MarkupSimpleNavigation) | * Markup Simple Navigation Modul installieren (Klassenname: MarkupSimpleNavigation) | ||
== Template / Theme erstellen == | == Template / Theme erstellen == | ||
| − | Basisstruktur | + | === Basisstruktur im Templateordner === |
| + | Diese ist schon angelegt, wenn man das blank Template am Anfang auswählt. | ||
<pre> | <pre> | ||
/scripts | /scripts | ||
| Zeile 28: | Zeile 29: | ||
admin.php | admin.php | ||
</pre> | </pre> | ||
| + | === Seitentemplates anlegen - einfache Variante === | ||
| + | Ein Template kann z.b. so aussehen: | ||
| + | |||
| + | '''basic-page.php''' | ||
| + | <syntaxhighlight lang="html5"> | ||
| + | <?php include('./head.inc'); // include header markup ?> | ||
| + | <h1><?php echo $page->title; ?></h1> | ||
| + | <?php include('./foot.inc'); // include footer markup ?> | ||
| + | <syntaxhighlight> | ||
| + | |||
| + | '''head.inc''' | ||
| + | <syntaxhighlight lang="html5"> | ||
| + | <!DOCTYPE html> | ||
| + | <html lang="en"> | ||
| + | <head> | ||
| + | <title><?php echo $page->title; ?></title> | ||
| + | </head> | ||
| + | <body> | ||
| + | <syntaxhighlight> | ||
| + | |||
| + | '''foot.inc''' | ||
| + | <syntaxhighlight lang="html5"> | ||
| + | </body> | ||
| + | </html> | ||
| + | <syntaxhighlight> | ||
Version vom 14. Februar 2017, 16:59 Uhr
Wir erstellt man in Processwire ein Template ? So gehts.
Links
http://modules.processwire.com/
Tipp: Module lassen sich unter Module > Neu direkt importieren wenn man den Modulklassennamen angibt.
Processwire installieren
- Install
- Installer laufen lassen, als Option Blank Template wählen.
- Backend Template
- Reno Modul installieren (ist schon drin, muss nur aktiviert werden)
- Language Support
- Language Support Module installieren
- Language in Setup anlegen (German)
- Language Pack für Core hochladen
Wichtige Module installieren
- Markup Simple Navigation Modul installieren (Klassenname: MarkupSimpleNavigation)
Template / Theme erstellen
Basisstruktur im Templateordner
Diese ist schon angelegt, wenn man das blank Template am Anfang auswählt.
/scripts /styles /errors home.php basic-page.php admin.php
Seitentemplates anlegen - einfache Variante
Ein Template kann z.b. so aussehen:
basic-page.php <syntaxhighlight lang="html5"> <?php include('./head.inc'); // include header markup ?>
<?php echo $page->title; ?>
<?php include('./foot.inc'); // include footer markup ?> <syntaxhighlight>
head.inc <syntaxhighlight lang="html5"> <!DOCTYPE html> <html lang="en"> <head>
<title><?php echo $page->title; ?></title>
</head> <body> <syntaxhighlight>
foot.inc <syntaxhighlight lang="html5"> </body> </html> <syntaxhighlight>