ProcessWire CMS - 初学者指南
已发表: 2022-03-10ProcessWire 是一个内容管理系统 (CMS),在 Mozilla Public License version 2.0 (MPL) 和 MIT License 下分发。 它的设计初衷就是为了解决这种固执己见(这不可避免地导致开发人员和用户感到沮丧)所引起的问题——你猜对了——不固执己见。 从本质上讲,它基于一些简单的核心概念,并提供了一个非常易于使用且功能强大的 API 来处理任何类型的内容。 让我们开始吧!
关于 SmashingMag 的进一步阅读:
- 内容管理系统设计
- 为什么静态网站生成器是下一件大事
- 内容管理系统 (CMS) 图标集(12 个自由图标)
- 内容管理系统入门
管理 GUI
安装 ProcessWire(需要 PHP 5.3.8+、MySQL 5.0.15+ 和 Apache)后,您将看到默认管理 GUI 的主页:

注意:您在分层页面树中看到的页面(稍后会详细介绍)在那里,因为我在安装过程中选择了“默认(初学者版)”网站配置文件。 这完全是可选的。 您也可以从一个空白的网站配置文件开始,这样您就可以从头开始构建所有内容。
您实际上可以从许多管理主题中进行选择,但对于 ProcessWire 2.6+,建议使用默认主题或 Reno 主题。 因为 Reno 预装在每个 ProcessWire 安装中,切换到它非常容易:只需安装它并在您的用户配置文件中选择它。

让我们快速浏览一下主要的后端导航:

- “页面” 这是管理 GUI 的入口点。 它具有分层页面树,因此,您网站的所有内容都在后端。
- “设置” 这是通过模板和字段设置安装的通用数据模型架构的地方(稍后会详细介绍)。 这也是 ProcessWire 模块经常为其特定功能和用户界面添加条目的地方——例如,在管理 GUI 中可视化日志消息或在处理多语言内容时管理所有不同的语言。
- “模块” 这是您管理网站所有模块的地方。 将 ProcessWire 模块视为 WordPress 插件:它们扩展和自定义系统。
- “访问” 这里是您管理用户、用户角色和用户权限的地方。
三个简单的核心概念
构成 ProcessWire 整体数据模型架构的核心概念恰好是三个:页面、字段和模板。 让我们一一来看看。
一切都是一页:或者,一页树来统治它们
ProcessWire 中的页面可以在您的网站前端生成一个常规页面,供您的用户访问(如上面屏幕截图中的“主页”和“关于”)。 但是一个页面也可以只存在于后端,没有前端对应物——例如,一个隐藏的设置页面,您可以在其中存储您网站的全球标语、徽标和版权声明。 当我在 ProcessWire 中说“一切都是页面”时,我是认真的。 哎呀,即使是管理 GUI 中的主要导航链接也是由分层页面树中的隐藏页面组成的!

这是如此的元,让我想起了某个 Xzibit 模因。 但是,让我们把它留在那里。
页面仅在后端可见的概念非常强大,因为它为如何通过其他页面构建和访问数据开辟了一个充满可能性的世界(您的想象力是唯一的限制)。 您可以构建一个庞大的产品目录,或者基于复杂页面层次结构的具有数十万个项目的 Intranet 应用程序,或者只是一个具有通常博客类别和标签的简单博客(每个类别和标签都是页面树中的一个页面) .
ProcessWire 社区的杰出成员 Joss Sanglier 将页面的概念分解为:
[I]n ProcessWire 页面 [...] 不是大量的信息,而是微小的东西,只不过是指向更有趣的字段和模板世界的链接; 只是您庞大的迷人数据库中的一小部分数据。ProcessWire 中的页面用于各种事情。 它们可以用作页面列表中的标记。 它们可以用作其他页面的组父级。 它们可以用作类别、标签或列表或用户。 它们甚至可以用于简单的下拉选择——只是为了提供标签和值。
让我们与分层页面树进行一点交互:

如您所见,页面可以编辑、移动或丢弃,并且它们可以拥有无限数量的子孙。
让我们打开“主页”页面:

这将我们带到 ProcessWire 的下一个核心概念,字段。
字段是您将数据放入其中的容器
字段基本上是您放入数据的容器。 此时,重要的是要意识到 ProcessWire 不像 WordPress 那样具有自定义字段的概念,因为ProcessWire 中的每个字段都是自定义字段。 当你创建一个字段时,你可以给它一个标签、一个描述和一些将出现在它下面的附加注释。
让我们编辑“标题”字段并为其添加描述和注释:

预装的字段类型涵盖了最基本的数据输入需求。 例如,您可以创建复选框、日期选择器、字段集(将其他字段分组为视觉逻辑单元的字段)、文件和图像上传器,当然还有文本和文本区域字段(默认的 WYSIWYG 编辑器是 CKEditor )。
还有很多预打包的和第三方的字段类型可供选择。 一个有用的核心模块,默认情况下不安装,是中继器字段。 它允许您动态创建数据集行。

ProcessWire 也非常适合处理图像。 例如,您可以决定哪些图像变体 ProcessWire 应在上传图像后自动创建图像(这为响应式图像提供了很好的用例)。 为图像选择缩略图是一件轻而易举的事。

另一个有用的字段类型是页面字段类型。 您可以将其他页面与您当前正在编辑的页面链接,从而在它们之间创建关系。 在字段的设置中,您可以决定输入的外观和与字段的交互应该如何——例如,应该选择单个页面还是多个页面,或者是否应该只选择特定父页面的子页面。 如果你要写一篇博文,你可以选择只允许博文类别自动完成。

您可以在字段设置中打开的一项简洁功能是能够在您的网站前端编辑字段的内容。 一旦用户登录到 ProcessWire 的后端,他们就可以切换到网站的前端并在最终呈现的地方编辑和保存内容。

查看 ProcessWire 中的页面和字段后,您可能会问自己:页面如何知道它有哪些字段? 我在哪里可以定义字段在页面上的排序和呈现方式? 所以,让我们继续讨论最后一个核心概念,模板。
模板是页面的蓝图
每次在分层页面树中创建页面时,ProcessWire 都需要知道哪个模板与它相关联。 这是因为页面需要知道它必须呈现哪些字段,并且该信息始终是相应模板的一部分。
长话短说:模板包含页面需要了解的关于其内容的所有信息(它有哪些字段、这些字段如何呈现以及它们的行为方式)。
让我们从示例安装中打开“Home”模板。

需要注意的主要是设置的数量。 这里真的有很多值得探索的地方。 例如,您可以将使用此模板创建的页面的访问权限限制为特定用户角色。 或者,您可以决定是否应将使用此模板创建的页面缓存一段特定的时间(以提高性能),以及必须清除缓存的条件。
另一个强大的设置隐藏在“家庭”选项卡中。 在这里,您可以定义使用此模板创建的页面是否可以具有子页面以及父页面或其子页面允许使用哪些模板。 这使您可以准确地创建所需的模板族层次结构类型。 这是一种灵活方便的方式(实际上是最强大的方式之一)来构建数据,它是 ProcessWire 展示其灵活性的众多方式之一。
让我们将注意力转向模板中的字段列表。 查看上面的屏幕截图,您可以看到字段的顺序类似于字段在主页上呈现的顺序。 您可以简单地拖放字段来更改列表中的顺序,从而在编辑主页时更改出现的顺序。

您还可以更改页面上字段的宽度。 只需单击一个字段并更改它。 让我们将“标题”和“标题”字段并排放置。

如何自定义和定制页面及其字段的用户界面的另一个示例是输入字段依赖项。 这些使您能够指定在何种条件下显示或要求页面编辑器中的特定字段。 仅当用户在“标题”字段中输入内容时,让“标题”字段在 UI 中可见,并且仅当用户在“标题”字段中输入内容时,将“摘要”字段标记为必填:

这是一个视频,向您展示了如何使用输入字段依赖项来增强用户在使用 ProcessWire 时的体验:
页面上字段的数量、顺序和外观完全由您控制。 您可以在模板中只放置一个字段,根本没有(不是很有用)或超过 50 个字段,100 个甚至更多。 您可以以任何您想要的方式订购它们,指定哪些是必需的或可见的,哪些不是,并指定在什么情况下它们应该是必需的或可见的。 这就是 ProcessWire 的非主见方法的亮点。
综述:页面、字段、模板
让我们回顾一下页面、字段和模板之间的技术关系:向模板添加字段,并在创建新页面时选择模板。 您在编辑页面时看到的字段是您添加到所选模板的字段。
另一种看待这个问题的方法是通过编程世界的类比:
- 模板就像类。
- 字段就像类的属性。
- 页面是类的实例。
一旦您将这些概念内化,您将具备在 ProcessWire 中开发所需的一切知识。 原因在于 ProcessWire 的理念完全基于这三个概念。 很酷,对吧?
模板文件和 API:注定要在一起的一对
您检索在 ProcessWire 后端输入的数据并将其输出到前端的位置当然是文件系统——更具体地说,是您的 ProcessWire 安装的/site/templates/
文件夹。 一个模板可以有一个与之关联的同名物理 PHP 文件; 因此, home
模板将在/site/templates/
文件夹中有一个home.php
文件。
注意:如何开发模板文件完全取决于您。 如果您熟悉 WordPress 开发事物的风格,您可以像以前一样继续。 或者,如果您有一个相当复杂且大型的设置,并且想要创建一个更复杂的架构,您可以使用受 MVC 启发的方法,它也可以工作。 Ryan Cramer 有一个很好的入门教程,标题为“如何构建模板文件”,您可以在其中学习在 ProcessWire 中开发模板文件的不同方法。
您在模板文件中编写的代码主要由基本的 PHP 结构( if
条件、 foreach
循环、 echo
语句)、HTML 标记和 ProcessWire 的 API 组成。 该 API 深受 jQuery 的启发——因此,它真的有点像通过方法、选择器和链接(流畅的接口)功能迭代和遍历您在后端输入的内容。 它易于使用且极具表现力,就像 jQuery 一样。
让我们从一些简单的示例开始,让您开始使用 API。 但在我们开始之前,请记得收藏 ProcessWire API 备忘单,这是一份有用的参考资料,其中包含所有可用 API 方法的概述。

我们首先要做的是访问和输出页面字段的内容。 API 公开了一个变量供我们处理: $page
。
使用$page
变量获取当前页面
$page
变量包含单个页面的所有字段。 这包括内置字段(如页面模板的名称),以及您作为开发人员添加到页面模板的字段。
让我们打开home.php
,这是home
模板的模板文件,并在其中添加以下行:
echo $page->title;
这告诉 ProcessWire 抓取我们当前所在页面(“主页”)的“标题”字段并将其输出。 假设我们在页面上还有一个“标题”字段,我们希望使用它来代替“标题”字段,但前提是用户在其中输入了一些内容。
echo $page->get("headline|title");
我们使用get
方法来访问页面的字段(因此, $page->get(“title”)
基本上等同于上面的第一个代码示例),并且我们在get
方法中编写了“headline|title”
。 这告诉 ProcessWire 首先检查“标题”字段并输出标题的内容。 但如果“标题”字段为空,则“标题”字段用作后备。
在 PHP 字符串中使用 API 变量也是可能的。 以下两个用于输出页面子级数量的echo
语句是等效的:
echo "This page has " . $page->numChildren . " children pages."; echo "This page has {$page->numChildren} children pages.";
让我们获取根页面的子页面(记住,我们仍在home.php
中)并将它们输出为链接列表:
echo "<ul>"; foreach ($page->children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } echo "</ul>";
内置字段的另一个示例(如上例中的children
和url
)是遍历页面的所有父项并创建面包屑导航:
echo "<ul>"; foreach ($page->parents as $parent) { echo "<li><a href='{$parent->url}'>{$parent->title}</a></li>"; } // output the page itself at the end echo "<li>{$page->title}</li>"; echo "</ul>";
在根页面(“主页”)上,这只会输出其标题,因为$page->parents
将为空。
之前,我向您展示了如何在管理 GUI 中创建图像缩略图。 创建缩略图也可以在 API 的帮助下以编程方式完成。 让我们遍历“图像”字段中上传的所有图像,创建一个 600 像素宽、比例高度的大型图像变体,以及一个 150 × 150 像素的缩略图,以及裁剪设置和图像质量等特定选项。 最后,我们要将缩略图链接到大图。 听起来很复杂? 它不是。
$options = array( "quality" => 90, "cropping" => "northwest" ); foreach ($page->images as $image) { $large = $image->width(600); $thumbnail = $image->size(150, 150, $options); echo "<a href='{$large->url}'><img src='{$thumbnail->url}' alt='></a>"; }
ProcessWire 在这方面非常聪明,因为它可以即时创建任意大小的图像并保留它们的缓存,因此它只需要创建一次版本。
这是最后一个$page
示例,向您展示 API 感觉很像您在使用 jQuery 时与 DOM 交互。 让我们获取当前所在父页面的最后一个子页面。
$wantedPage = $page->parent->children()->last();
除了$page
变量之外,API 还公开了另一个重要的变量: $pages
。
使用$pages
变量获取所有页面
使用$pages
,您可以访问 ProcessWire 安装中的所有页面。 换句话说,它使您可以从任何地方访问您的所有内容。
例如,您的 ProcessWire 安装中可能有一个隐藏的(即,无法在前端访问)设置页面; 您可以添加全局设置,例如您网站的标题和描述; 您可以从任何您想要的模板文件访问和输出这些内容 blob。
$settings = $pages->get("template=settings"); echo "<h1>{$settings->global_title}</h1>"; echo "<p>{$settings->global_description}</p>";
博客的单个主题页面的一个常见用例是显示引用该主题的所有博客文章。 只需在主题的模板文件中写入:
$pages->find("template=blog-post, topics=$page");
注意: topics
是blog-post
模板中的一个字段,您可以在其中添加特定于博客文章的所有主题类别。
另一个强大的设置隐藏在“家庭”选项卡中。 在这里,您可以定义使用此模板创建的页面是否可以具有子页面以及父页面或其子页面允许使用哪些模板。 这使您可以准确地创建所需的模板族层次结构类型。 这是一种灵活方便的方式(实际上是最强大的方式之一)来构建数据,它是 ProcessWire 展示其灵活性的众多方式之一。
让我们将注意力转向模板中的字段列表。 查看上面的屏幕截图,您可以看到字段的顺序类似于字段在主页上呈现的顺序。 您可以简单地拖放字段来更改列表中的顺序,从而在编辑主页时更改出现的顺序。

您还可以更改页面上字段的宽度。 只需单击一个字段并更改它。 让我们将“标题”和“标题”字段并排放置。

如何自定义和定制页面及其字段的用户界面的另一个示例是输入字段依赖项。 这些使您能够指定在何种条件下显示或要求页面编辑器中的特定字段。 仅当用户在“标题”字段中输入内容时,让“标题”字段在 UI 中可见,并且仅当用户在“标题”字段中输入内容时,将“摘要”字段标记为必填:


这是一个视频,向您展示了如何使用输入字段依赖项来增强用户在使用 ProcessWire 时的体验:
页面上字段的数量、顺序和外观完全由您控制。 您可以在模板中只放置一个字段,根本没有(不是很有用)或超过 50 个字段,100 个甚至更多。 您可以以任何您想要的方式订购它们,指定哪些是必需的或可见的,哪些不是,并指定在什么情况下它们应该是必需的或可见的。 这就是 ProcessWire 的非主见方法的亮点。
综述:页面、字段、模板
让我们回顾一下页面、字段和模板之间的技术关系:向模板添加字段,并在创建新页面时选择模板。 您在编辑页面时看到的字段是您添加到所选模板的字段。
另一种看待这个问题的方法是通过编程世界的类比:
- 模板就像类。
- 字段就像类的属性。
- 页面是类的实例。
一旦您将这些概念内化,您将具备在 ProcessWire 中开发所需的一切知识。 原因在于 ProcessWire 的理念完全基于这三个概念。 很酷,对吧?
模板文件和 API:注定要在一起的一对
您检索在 ProcessWire 后端输入的数据并将其输出到前端的位置当然是文件系统——更具体地说,是您的 ProcessWire 安装的/site/templates/
文件夹。 一个模板可以有一个与之关联的同名物理 PHP 文件; 因此, home
模板将在/site/templates/
文件夹中有一个home.php
文件。
注意:如何开发模板文件完全取决于您。 如果您熟悉 WordPress 开发事物的风格,您可以像以前一样继续。 或者,如果您有一个相当复杂且大型的设置,并且想要创建一个更复杂的架构,您可以使用受 MVC 启发的方法,它也可以工作。 Ryan Cramer 有一个很好的入门教程,标题为“如何构建模板文件”,您可以在其中学习在 ProcessWire 中开发模板文件的不同方法。
您在模板文件中编写的代码主要由基本的 PHP 结构( if
条件、 foreach
循环、 echo
语句)、HTML 标记和 ProcessWire 的 API 组成。 该 API 深受 jQuery 的启发——因此,它真的有点像通过方法、选择器和链接(流畅的接口)功能迭代和遍历您在后端输入的内容。 它易于使用且极具表现力,就像 jQuery 一样。
让我们从一些简单的示例开始,让您开始使用 API。 但在我们开始之前,请记得收藏 ProcessWire API 备忘单,这是一份有用的参考资料,其中包含所有可用 API 方法的概述。

我们首先要做的是访问和输出页面字段的内容。 API 公开了一个变量供我们处理: $page
。
使用$page
变量获取当前页面
$page
变量包含单个页面的所有字段。 这包括内置字段(如页面模板的名称),以及您作为开发人员添加到页面模板的字段。
让我们打开home.php
,这是home
模板的模板文件,并在其中添加以下行:
echo $page->title;
这告诉 ProcessWire 抓取我们当前所在页面(“主页”)的“标题”字段并将其输出。 假设我们在页面上还有一个“标题”字段,我们希望使用它来代替“标题”字段,但前提是用户在其中输入了一些内容。
echo $page->get("headline|title");
我们使用get
方法来访问页面的字段(因此, $page->get(“title”)
基本上等同于上面的第一个代码示例),并且我们在get
方法中编写了“headline|title”
。 这告诉 ProcessWire 首先检查“标题”字段并输出标题的内容。 但如果“标题”字段为空,则“标题”字段用作后备。
在 PHP 字符串中使用 API 变量也是可能的。 以下两个用于输出页面子级数量的echo
语句是等效的:
echo "This page has " . $page->numChildren . " children pages."; echo "This page has {$page->numChildren} children pages.";
让我们获取根页面的子页面(记住,我们仍在home.php
中)并将它们输出为链接列表:
echo "<ul>"; foreach ($page->children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } echo "</ul>";
内置字段的另一个示例(如上例中的children
和url
)是遍历页面的所有父项并创建面包屑导航:
echo "<ul>"; foreach ($page->parents as $parent) { echo "<li><a href='{$parent->url}'>{$parent->title}</a></li>"; } // output the page itself at the end echo "<li>{$page->title}</li>"; echo "</ul>";
在根页面(“主页”)上,这只会输出其标题,因为$page->parents
将为空。
之前,我向您展示了如何在管理 GUI 中创建图像缩略图。 创建缩略图也可以在 API 的帮助下以编程方式完成。 让我们遍历“图像”字段中上传的所有图像,创建一个 600 像素宽、比例高度的大型图像变体,以及一个 150 × 150 像素的缩略图,以及裁剪设置和图像质量等特定选项。 最后,我们要将缩略图链接到大图。 听起来很复杂? 它不是。
$options = array( "quality" => 90, "cropping" => "northwest" ); foreach ($page->images as $image) { $large = $image->width(600); $thumbnail = $image->size(150, 150, $options); echo "<a href='{$large->url}'><img src='{$thumbnail->url}' alt='></a>"; }
ProcessWire 在这方面非常聪明,因为它可以即时创建任意大小的图像并保留它们的缓存,因此它只需要创建一次版本。
这是最后一个$page
示例,向您展示 API 感觉很像您在使用 jQuery 时与 DOM 交互。 让我们获取当前所在父页面的最后一个子页面。
$wantedPage = $page->parent->children()->last();
除了$page
变量之外,API 还公开了另一个重要的变量: $pages
。
使用$pages
变量获取所有页面
使用$pages
,您可以访问 ProcessWire 安装中的所有页面。 换句话说,它使您可以从任何地方访问您的所有内容。
例如,您的 ProcessWire 安装中可能有一个隐藏的(即,无法在前端访问)设置页面; 您可以添加全局设置,例如您网站的标题和描述; 您可以从任何您想要的模板文件访问和输出这些内容 blob。
$settings = $pages->get("template=settings"); echo "<h1>{$settings->global_title}</h1>"; echo "<p>{$settings->global_description}</p>";
博客的单个主题页面的一个常见用例是显示引用该主题的所有博客文章。 只需在主题的模板文件中写入:
$pages->find("template=blog-post, topics=$page");
注意: topics
是blog-post
模板中的一个字段,您可以在其中添加特定于博客文章的所有主题类别。
让我们更多地使用 ProcessWire 的选择器引擎。 让我通过向您介绍 ProcessWire 的演示网站(美国摩天大楼目录)向您展示一些示例。 演示网站包含许多页面,并具有有趣的数据模型架构(即相互引用的建筑师、城市、建筑物和位置等内容),它是展示您可以使用选择器做什么的一个很好的用例。
此示例查找所有在正文中提及“帝国大厦”一词的摩天大楼:
$pages->get("template=cities")->find("template=skyscraper, body*=empire state building");
注意:首先我们得到带有模板cities
的页面; 然后,我们得到所有带有模板skyscraper
的页面。 我们可以这样链接方法的原因是因为所有摩天大楼页面都是“城市”页面的子子级。
让我们找出建筑师 Adrian Smith、Eric Kuhne 或 William Pereira 的所有摩天大楼,然后按高度升序对结果进行排序:
$adrian = $pages->get("template=architect, name=adrian-smith"); $eric = $pages->get("template=architect, name=eric-kuhne"); $william = $pages->get("template=architect, name=william-pereira"); $skyscrapers = $pages->find("template=skyscraper, architects=$adrian|$eric|$william, sort=height");
您可以通过一步找到所有请求的架构师来优化代码,而不是三个:
$architects = $pages->find("template=architect, name=adrian-smith|eric-kuhne|william-pereira"); $skyscrapers = $pages->find("template=skyscraper, architects=$architects, sort=height");
注意: get
方法可能总是返回一页; find
方法可能总是返回多个页面。
您可以使用子选择器进一步修改代码(是的,您可以在选择器中使用选择器):
$skyscrapers = $pages->find("template=skyscraper, architects=[name=adrian-smith|eric-kuhne|william-pereira], sort=height");
其他 API 变量
$page
和$pages
不是您可以使用的唯一 API 变量。 还有很多其他的,例如$session
(用于登录和注销用户并重定向到其他页面)、 $user
(与当前查看页面的用户建立连接)和$config
(用于特定于您的 ProcessWire 安装的设置)。 让我们看两个例子。
首先,让我们将用户重定向到主页:
$session->redirect($pages->get("template=home")->url);
如果当前用户已登录,让我们做一些事情:
if ($user->isLoggedin()) { /* do something */ }
使用模块扩展 ProcessWire 的功能
ProcessWire 建立在模块化且易于扩展的架构上,它显示:每个安装都包含 ProcessWire 的核心(ProcessWire 的本质,它支持基本功能)和一组位于顶部的预打包模块(所谓的核心模块)核心并扩展它。
核心模块
这些预打包的模块有一些是默认安装和激活的,而另一些是默认卸载的。 例如,ProcessWire 的内置评论系统是一个您可以随时打开或关闭的模块。 此外,我们之前谈到的中继器字段和对内容的多语言支持基本上只是您可以在项目中需要它们时安装的模块。
Other examples of neat little core modules are Page Names , which validates text input when you're typing a page name (automatically transforming, say, umlauts like a to ae ), and Page Path History , which keeps track of past URLs where pages have lived and automatically redirects to the new location whenever an old URL is accessed.
Finding and Installing Modules
The official modules repository is the main spot where you can find and download ProcessWire modules. On a module's page, you will find the description and purpose of the module and links to the respective GitHub repository and support forum. Module authors are highly encouraged to post their modules in the official repository because it has the highest visibility and is the place people think of first when they want to find a ProcessWire module.
Installing a module is as easy as dragging the module's files to the /site/modules/
directory and installing it in the admin GUI. There are other ways to install a module, such as by installing the Modules Manager, which enables you to browse (and install) modules without leaving the admin GUI.
商业模块
While most modules are free, there are a few commercial ones, too. The ones being promoted in ProcessWire's store are by the lead developer, Ryan Cramer. There you will find the following modules:
- ProDrafts enables you to maintain separate draft and live versions of any page. It also provides a comparison and diff tool, as well as automatic saving capabilities.
- ProFields are a group of ProcessWire modules that help you manage more data with fewer fields, saving you time and energy.
- ProCache (among other things) provides an impressive performance boost for your website by completely bypassing PHP and MySQL and enabling your web server to deliver pages of your ProcessWire website as if they were static HTML files.
Don't miss the screenshots and videos on the module pages to get a first impression. This is finely executed software.
There are also commercial modules outside of the official website, such as Padloper, an e-commerce platform built on top of ProcessWire. To be fair, what is definitely missing in the ProcessWire cosmos is a way for module authors to easily publish their commercial modules in a centralized spot.
How Do ProcessWire Modules Generally Compare to WordPress Plugins?
The reason why ProcessWire has so fewer modules than WordPress (approximately 400 versus more than 40,000) is not so much because it is less popular (an understatement, of course), but more because the core itself is already so feature-rich that adding a ton of modules to extend it is simply not necessary. For example, you don't need a module to create a gallery slideshow or to get the first child of something or to generate thumbnails. All of that (and much more) is already covered out of the box.
So, whereas in WordPress your typical method of solving a problem would be to search for a plugin, in ProcessWire you would first look to the tools available in core; in 90% of cases, that would provide you with the solution.
What You Can Build With ProcessWire
Because ProcessWire behaves more like a framework than a CMS (the core is actually a framework, and the CMS is an application built on top of it), the use cases for building things with ProcessWire are pretty broad. You may want to check out some websites powered by ProcessWire (especially the most liked websites).
ProcessWire is a good fit if you want to develop a JSON REST API, an image-resizing app for employees, a front end for managing millions of products (scalability is pretty impressive — you can have literally millions of pages on a single installation), a web application for displaying the financial results of companies, a simple blog, a website for a big university, or just a simple one-page informational website.
Where To Go From Here: There's A Lot To Discover
Naturally, a beginner's guide can't talk about everything the tool has to offer. So, here is a short list of other ProcessWire features, facts, links and tools worth mentioning:
- Check out ProcessWire Weekly and ProcessWire's blog to stay up to date on the latest news.
- ProcessWire has built-in caching mechanisms (for example, a template and markup cache).
- Wireshell is a command-line interface for ProcessWire based on the Symphony Console component.
- Security is a top priority for ProcessWire.
- Visit grab.pw (isn't that the coolest domain name ever?) to download the latest stable version of ProcessWire (ZIP file, 10MB).
- ProcessWire has a small and friendly community. The discussion board is the central place to discuss any questions and problems.
- ProcessWire has good multi-language support. The multi-language modules are part of the prepackaged core modules.
- ProcessWire has a transparent roadmap, and development is very active. There is a new minor release nearly every week.
- See what others have to say about ProcessWire in the reviews section and on alternativeTo. There's also an interesting Quora thread titled “How does ProcessWire compare to WordPress.”
- ProcessWire.tv is a searchable collection of ProcessWire tutorial videos.
概括
ProcessWire is a system that rewards you [for] being curious. We aim to show you how to fish so that you can catch the big fish.
This statement by Ryan Cramer, the creator of ProcessWire, encapsulates what ProcessWire is all about.
I think what resonates with a lot of people is that ProcessWire is a system that goes from simple to complex, not the other way around. It doesn't assume what you want to build, but instead lays a strong, non-opinionated foundation by offering you effective, powerful tools and leaving the rest to you. That conceptual aesthetic has, to me, a certain appeal to it.