ProcessWire Fields and Templates Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
ProcessWire Fields and Templates Setup
Simple
from 1 business day to 3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

ProcessWire Fields and Templates Setup

Fields and templates are the foundation of any ProcessWire project. A field defines data type and storage method; a template is a set of fields plus an associated PHP rendering file. Properly designed field structure saves tens of hours in further development.

Creating Fields

Fields are created in Setup → Fields → Add New. Must specify:

  • Name — machine name (Latin, _), used in code as $page->field_name
  • Type — data type
  • Label — displayed in editor

Frequently used field types:

Type Storage Application
FieldtypeText VARCHAR Short strings, titles
FieldtypeTextarea TEXT Long text without HTML
FieldtypeTextareaLanguage TEXT (per lang) Multilingual text
FieldtypeImage separate table Images with metadata
FieldtypeFile separate table Documents, PDF
FieldtypePage INT / table Relations between pages
FieldtypeRepeater child pages Repeating field groups
FieldtypeOptions INT Dropdown list
FieldtypeCheckbox INT(1) Boolean value
FieldtypeInteger INT Numbers
FieldtypeFloat FLOAT Decimal numbers, prices
FieldtypeURL VARCHAR Links
FieldtypeDatetime INT (UNIX timestamp) Date and time

Configuring FieldtypePage (Relations)

When creating Page-type field, configure:

  • Derefence asPage (one page) or PageArray (multiple)
  • Parent — limit selection to child pages of specific parent
  • Template filter — show only pages with specified template
// In code: single relation
echo $page->category->title;

// Multiple relation
foreach ($page->tags as $tag) {
    echo "<span class='tag'>{$tag->title}</span>";
}

Creating Templates

Template is created in Setup → Templates → Add New. Process:

  1. Create PHP file in /site/templates/my-template.php
  2. Go to Templates → Add New — ProcessWire finds file automatically
  3. Add needed fields on Fields tab
  4. Configure Access (permissions)
  5. Configure URLs (allow/forbid child pages, URL suffix)

Advanced Tab

Important Advanced tab parameters:

  • Page class — custom PHP class for pages of this template
  • Prepend/Append file — include _init.php and _main.php
  • Cache time — cache template output N seconds
  • Allow page numbers — allow /page2, /page3 in URL (needed for pagination)

Fieldset and Field Grouping

Fieldset (FieldtypeFieldsetOpen / FieldtypeFieldsetClose) groups fields visually in editor without affecting storage:

Adding fields to template order:

  1. fieldset_seo_open — FieldtypeFieldsetOpen, label="SEO"
  2. meta_title — FieldtypeText
  3. meta_description — FieldtypeTextarea
  4. fieldset_seo_close — FieldtypeFieldsetClose

In page editor these fields collapse into "SEO" block.

Repeater: Repeating Groups

Repeater field type contains several child fields that editor can add/remove:

// Field features (Repeater with fields: icon, headline, text)
foreach ($page->features as $feature) {
    echo "<div class='feature-card'>";
    echo "  <img src='{$feature->icon->url}' alt=''>";
    echo "  <h3>{$feature->headline}</h3>";
    echo "  <p>{$feature->text}</p>";
    echo "</div>";
}

RepeaterMatrix (paid ProFields module) allows multiple block types in one field — like Flexible Content in ACF.

Export and Import Configuration

Field and template configuration can be exported via Setup → Export/Import or DatabaseBackups module. To move between environments use JSON export of templates:

# Backup structure (not data)
# Via RockMigrations module or manually via API:
php -r "
  require '/var/www/site/index.php';
  echo \$templates->get('product')->exportJSON();
" > product-template.json

RockMigrations module allows describing field and template structure in PHP code and apply changes reproducibly — like migrations in Laravel.