Processwire - Themes / Templates: Unterschied zwischen den Versionen
Aus Wikizone
(→Links) |
Steff (Diskussion | Beiträge) |
||
| Zeile 4: | Zeile 4: | ||
== Theme Strategien == | == Theme Strategien == | ||
| + | |||
=== Basic Theme === | === Basic Theme === | ||
| + | <syntaxhighlight lang="php"> | ||
| + | </syntaxhighlight> | ||
| + | <pre> | ||
| + | templates/ | ||
| + | _func.inc (wenn benötigt) | ||
| + | home.php | ||
| + | basic_page.php | ||
| + | templates/partials | ||
| + | foot.inc | ||
| + | head.inc | ||
| + | </pre> | ||
| + | === Delayed Output and Advanced Templates === | ||
| + | Über prependTemplateFile und appendTemplateFile verarbeitet man die Templates wenn alle Inhalte zusammengesetzt sind. | ||
| − | + | '''Ordnerstruktur''' | |
| − | |||
<pre> | <pre> | ||
templates/ | templates/ | ||
| Zeile 19: | Zeile 32: | ||
head.inc | head.inc | ||
</pre> | </pre> | ||
| − | |||
| − | |||
| − | config.php | + | '''config.php''' |
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
<?php | <?php | ||
... | ... | ||
$config->debug = false; | $config->debug = false; | ||
| − | |||
$config->sessionFingerprint = true; | $config->sessionFingerprint = true; | ||
$config->prependTemplateFile = '_init.php'; | $config->prependTemplateFile = '_init.php'; | ||
| Zeile 39: | Zeile 49: | ||
); | ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| + | |||
<pre> | <pre> | ||
templates/ | templates/ | ||
Version vom 19. April 2017, 09:47 Uhr
Links
Siehe auch
Theme Strategien
Basic Theme
templates/ _func.inc (wenn benötigt) home.php basic_page.php templates/partials foot.inc head.inc
Delayed Output and Advanced Templates
Über prependTemplateFile und appendTemplateFile verarbeitet man die Templates wenn alle Inhalte zusammengesetzt sind.
Ordnerstruktur
templates/ _func.inc _init.inc _main.inc templates/partials foot.inc head.inc
config.php
<?php
...
$config->debug = false;
$config->sessionFingerprint = true;
$config->prependTemplateFile = '_init.php';
$config->appendTemplateFile = '_main.php';
$config->imageSizerOptions = array(
'upscaling' => true, // upscale if necessary to reach target size?
'cropping' => true, // crop if necessary to reach target size?
'autoRotation' => true, // automatically correct orientation?
'sharpening' => 'soft', // sharpening: none | soft | medium | strong
'quality' => 90, // quality: 1-100 where higher is better but bigger
);
templates/ _func.inc _init.inc _main.inc templates/partials foot.inc head.inc
AJAX Driven Theme
config.php
// if ajax request set $ajax = $input->post->ajax;