pw-module-markup
Use when creating independent frontend rendering systems explicitly extending the ProcessWire Markup module ecosystem.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating independent frontend rendering systems explicitly extending the ProcessWire Markup module ecosystem.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when building, structuring, or refactoring native backend modules for ProcessWire using PHP 8.4 and strict typing.
Use when designing, structuring, or rendering HTML for ProcessWire Admin interfaces, custom Process modules, or Inputfields.
Use when brainstorming or designing ProcessWire modules, templates, field schemas, or hooks to resolve ambiguity and validate architecture before implementation.
Use when creating, executing, or managing Pest tests within ProcessWire or ProcessWire modules, including Test-Driven Development (TDD) tasks.
Use when encountering any bug, test failure, blank screen of death, or unexpected behavior in ProcessWire before proposing fixes.
Use when creating or updating module documentation, package READMEs, architecture guides, or CLI command references for ProcessWire projects.
| name | pw-module-markup |
| description | Use when creating independent frontend rendering systems explicitly extending the ProcessWire Markup module ecosystem. |
| risk | safe |
| source | processwire-boost |
| date_added | 2026-04-08 |
Markup Modules within ProcessWire do not alter core mechanics, run inherently in the background, or specifically format string arrays like Textformatters. Instead, they act as HTML generation engines and widget generators deployed freely universally across frontend templates locally by developer invocations ($modules->get('MarkupMyWidget')->render()).
These modules strictly separate complex HTML nesting structures from the local template php files, effectively maintaining structural cleanliness universally matching independent Controller/UI patterns.
Verify module logic universally adhering to standard markup architecture limits:
render()) granting other developers simplified usage access deploying localized variables securely?wire('config')->scripts->add().Creating a robust interface mapping generating explicit standard HTML strings globally structured intuitively.
<?php
declare(strict_types=1);
namespace ProcessWire;
class MarkupPricingTable extends WireData implements Module
{
public static function getModuleInfo(): array
{
return [
'title' => 'Markup: Pricing Table Generator',
'version' => 101,
'summary' => 'Dynamically builds complex UIkit pricing matrix components pulling data directly via system page children arrays targeting service domains.',
'requires' => [
'ProcessWire>=3.0.0',
'PHP>=8.4.0'
]
];
}
/**
* Executes generation dynamically injecting mandatory CSS dependencies globally natively.
*/
public function init(): void
{
// Optionally attach static resources explicitly verifying they deploy onto global configurations universally.
// $this->wire()->config->styles->add($this->wire()->config->urls->MarkupPricingTable . 'markup-pricing.css');
}
/**
* Public method universally triggered specifically when templates build display domains explicitly.
*
* @param PageArray $packages Explicit list mapping active Pricing Option pages.
* @return string Compiled HTML UI rendering.
*/
public function render(PageArray $packages): string
{
if (!$packages->count()) {
return '';
}
$out = "<div class='uk-grid uk-child-width-1-3@m' uk-grid>";
foreach ($packages as $pkg) {
$title = $this->wire()->sanitizer->entities($pkg->title);
$price = $this->wire()->sanitizer->float($pkg->get('price'));
$features = $this->wire()->sanitizer->entities($pkg->get('summary'));
$out .= "
<div>
<div class='uk-card uk-card-default uk-card-body uk-text-center'>
<h3 class='uk-card-title'>{$title}</h3>
<div class='uk-text-large uk-text-primary'>₺{$price}</div>
<p class='uk-text-meta'>{$features}</p>
<a href='{$pkg->url}' class='uk-button uk-button-secondary'>Select Plan</a>
</div>
</div>";
}
$out .= "</div>";
return $out;
}
/**
* Integrates caching mechanism directly relying on native MarkupCache configurations.
*/
public function renderCached(PageArray $packages, int $minutes = 60): string
{
$cache = $this->wire()->modules->get('MarkupCache');
// Produce explicit reliable cache keys mapping node configurations safely
$cacheKey = "pricing_tables_" . $packages->count() . "_" . $packages->first()->id;
if ($data = $cache->get($cacheKey, $minutes * 60)) {
return $data; // Deliver compiled native cache directly
}
// Compilation fails evaluating inside cached nodes, rendering fully natively globally
$data = $this->render($packages);
$cache->save($data);
return $data;
}
}
ProcessWire\WireData.ProcessWire\MarkupCache directly mapping large DOM evaluations robustly maintaining site metrics effectively.(Pass these direct prompts to the agent to initiate workflows instantly)
[Build Markup Component Framework]
"Generate a standalone Markup module constructed strictly targeting explicit HTML generating models labeled safely as
MarkupFeatureSlider. Outline a robust programmatic standardrender()method mapped explicitly executing iteration sequences spanning nativePageArrayvariables structuring individual HTML domains strictly mapped around explicit UIkit 3uk-sliderDOM properties properly deploying internal structural attributes automatically. Enforce strict variable sanitation consistently throughout string creations restricting XSS vectors explicitly."
CRITICAL RULE FOR ALL AI AGENTS: When you need to understand, use, or hook into a ProcessWire core class or module, you MUST NEVER guess or hallucinate the API methods.
.agents/docs/index.md..agents/docs/core/Page.md), and use your file reading tools to read its methods, parameters, and hookable (🪝) events before writing any code.