Processwire - Themes / Templates: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
Zeile 50: Zeile 50:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
<pre>
 
templates/
 
  _func.inc
 
  _init.inc
 
  _main.inc
 
templates/partials
 
  foot.inc
 
  head.inc
 
</pre>
 
  
 
=== AJAX Driven Theme ===
 
=== AJAX Driven Theme ===

Version vom 19. April 2017, 09:48 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
	);


AJAX Driven Theme

config.php

// if ajax request set
$ajax = $input->post->ajax;


3.x Strategie

Module

Processwire - Writing Modules