Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ProcessWire – Ein CMS voller Freiheiten
Search
Matthias Mees
March 21, 2014
Programming
0
200
ProcessWire – Ein CMS voller Freiheiten
Vortrag über das CMS ProcessWire vom Webkongress Erlangen 2014
Matthias Mees
March 21, 2014
Tweet
Share
More Decks by Matthias Mees
See All by Matthias Mees
„Kannst Du mich hören?“
yellowled
0
77
Styleguides für alle(s)
yellowled
0
100
Other Decks in Programming
See All in Programming
個人開発で徳島大学生60%以上の心を掴んだアプリ、そして手放した話
akidon0000
1
140
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
230
Android 16 × Jetpack Composeで縦書きテキストエディタを作ろう / Vertical Text Editor with Compose on Android 16
cc4966
2
260
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
1.8k
Design Foundational Data Engineering Observability
sucitw
3
200
Namespace and Its Future
tagomoris
6
710
概念モデル→論理モデルで気をつけていること
sunnyone
3
290
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
320
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
470
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
610
Reading Rails 1.0 Source Code
okuramasafumi
0
250
スケールする組織の実現に向けた インナーソース育成術 - ISGT2025
teamlab
PRO
1
160
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Embracing the Ebb and Flow
colly
87
4.8k
Balancing Empowerment & Direction
lara
3
620
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
Transcript
ProcessWire Ein CMS voller Freiheiten
• Matthias Mees – @yellowled • http://netzgestaltung.net • HTML, (S)CSS,
JS/jQuery, CMS
Eckdaten
• Apache mit mod_rewrite und .htaccess • PHP >= 5.3.8
mit GD2, PDO und mysqli • MySQL >= 5.0.15
None
• http://processwire.com • http://processwire.com/demo/ • http://processwire.com/talk/
Showcase
None
None
None
Backend
• schlicht und schlank • Eye-Candy über jQuery UI •
aber: ohne JS und in IE < 8 nicht benutzbar • anpassbare Eingabemasken mit „Hilfetexten“
None
• Medien sind über Felder Seiten zugeordnet • keine zentrale
Medienverwaltung (im Kern) • API-Funktionen, um Bilder zu bearbeiten und auf ihre Eigenschaften zuzugreifen
None
Templates
• jeder Seite ist ein Template zugeordnet • jedem Template
sind Felder zugewiesen • jedem Feld sind ein Typ und verschiedene Attribute zugewiesen • Zugriff über API-Variablen und -Methoden
None
None
Module
• derzeit 224 Erweiterungen aller Art • viele Aufgaben von
Modulen lassen sich bereits nativ in Templates umsetzen • statt Themes: Seiten-Profile
None
Was ist daran nun so ausgesprochen „frei“?
ProcessWire gibt nichts vor
• Struktur, Gestaltung und Verhalten liegen in der Hand des
Entwicklers • es passt sich der eigenen Arbeitsweise an • oberflächlich wenig komplex, aber sehr leistungsfähig über die API
Alles ist eine Seite
• keine zusätzlichen Inhaltstypen • jedes Feld ist ein „freies“
Feld • das gesamte System ist modular auf dem PW- Framework aufgebaut und erweiterbar
Wie jQuery für PHP
• jeder Knoten (Seite) hat ein Eltern- und Kind- Element(e)
und unterschiedliche Attribute (Felder) entsprechend seines Typs (Template) • Methoden, z.B. find(), children(), parent() • Selektor – Operator – Wert
Code-Beispiele
<?php // Das Feld body der aktuellen Seite ausgeben echo
$page->body; // Die Seite einstellungen finden und // deren Feld copyright ausgeben echo $pages->get("/einstellungen/")->copyright; // Wie viele Speaker gibt es auf dem WKE 2014? echo $pages->count("template=speaker");
<?php // Navigations-Pfad (Breadcrumb) foreach($page->parents as $p) { echo "<a
href='{$p->url}'>{$p->title}</a> » "; } echo $page->title; // Bildergalerie mit Thumbnails foreach ($page->$images as $i) { $thumb = $i->size(300,225); echo "<li><a href='{$i->url}'><img src='{$thumb->url}' alt='{$i->description}'></a></ li>"; }
<?php // Vortragsprogramm des WKE 2014 von heute $today =
date('d.m.Y H:i', time()); // nur in Hörsaal 11 sortiert nach Uhrzeit $talks = $pages- >find("template=talk,talk_datetime>today,talk_room =11,sort=talk_datetime"); // ausgeben echo "<ul>"; foreach($talks as $talk) { // (<time> nur aus Platzgründen ausgelassen) echo "<li>" . strftime('%H:%M', strtotime($talk->talk_datetime)) . " " . $talk- >title . " (" . $talk->speaker . ")</li>"; } echo "</ul>";
Ausgabe Codebeispiel 3 (Im Standard-Seitenprofil)
Danke für’s zuhören. slideshare.net/matmees