<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3ATHE_pattern</id>
	<title>ICT:THE pattern - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3ATHE_pattern"/>
	<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:THE_pattern&amp;action=history"/>
	<updated>2026-07-23T01:06:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mwiki.costasano.club/index.php?title=ICT:THE_pattern&amp;diff=505&amp;oldid=prev</id>
		<title>Mngr: Created page with &quot;= ICT: Pattern — Dashboard, Page Form, Template, Cargo Table =  This page documents the standard pattern for creating structured data modules in the Costa Sano Research Archive.   It applies to all entities stored in Cargo tables (e.g., Chapters, Persons, Locations, Events, Assets).  The pattern consists of four coordinated components:  # Template — stores data and writes to Cargo # Form — provides a clean, simple editing UI # Dashboard — lists records and links...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:THE_pattern&amp;diff=505&amp;oldid=prev"/>
		<updated>2026-02-08T17:03:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= ICT: Pattern — Dashboard, Page Form, Template, Cargo Table =  This page documents the standard pattern for creating structured data modules in the Costa Sano Research Archive.   It applies to all entities stored in Cargo tables (e.g., Chapters, Persons, Locations, Events, Assets).  The pattern consists of four coordinated components:  # Template — stores data and writes to Cargo # Form — provides a clean, simple editing UI # Dashboard — lists records and links...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= ICT: Pattern — Dashboard, Page Form, Template, Cargo Table =&lt;br /&gt;
&lt;br /&gt;
This page documents the standard pattern for creating structured data modules in the Costa Sano Research Archive.  &lt;br /&gt;
It applies to all entities stored in Cargo tables (e.g., Chapters, Persons, Locations, Events, Assets).&lt;br /&gt;
&lt;br /&gt;
The pattern consists of four coordinated components:&lt;br /&gt;
&lt;br /&gt;
# Template — stores data and writes to Cargo&lt;br /&gt;
# Form — provides a clean, simple editing UI&lt;br /&gt;
# Dashboard — lists records and links to the form&lt;br /&gt;
# Cargo table — automatically created from the template declaration&lt;br /&gt;
&lt;br /&gt;
This pattern is stable, reproducible, and successor‑friendly.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 1. Template (Template:EntityName) ==&lt;br /&gt;
&lt;br /&gt;
The template defines:&lt;br /&gt;
* the Cargo table structure (via &amp;lt;code&amp;gt;#cargo_declare&amp;lt;/code&amp;gt;)&lt;br /&gt;
* how data is stored (via &amp;lt;code&amp;gt;#cargo_store&amp;lt;/code&amp;gt;)&lt;br /&gt;
* the form association (via &amp;lt;code&amp;gt;#forminput:form=…&amp;lt;/code&amp;gt;)&lt;br /&gt;
* the display of the page itself&lt;br /&gt;
&lt;br /&gt;
=== Structure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
Documentation text…&lt;br /&gt;
&lt;br /&gt;
{{#cargo_declare:&lt;br /&gt;
 _table=TableName&lt;br /&gt;
 |field1=String&lt;br /&gt;
 |field2=Text&lt;br /&gt;
 |field3=Date&lt;br /&gt;
 |field4=Page&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{#forminput:form=EntityName}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#cargo_store:&lt;br /&gt;
 field1={{{field1|}}}&lt;br /&gt;
 |field2={{{field2|}}}&lt;br /&gt;
 |field3={{{field3|}}}&lt;br /&gt;
 |field4={{{field4|}}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== {{{field1|}}} ==&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;#forminput:form=EntityName&amp;lt;/code&amp;gt; line is required so Page Forms knows which form edits pages using this template.&lt;br /&gt;
* Only fields declared in &amp;lt;code&amp;gt;#cargo_declare&amp;lt;/code&amp;gt; may be stored.&lt;br /&gt;
* The template name must match the form’s &amp;lt;code&amp;gt;{{{for template|…}}}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 2. Form (Form:EntityName) ==&lt;br /&gt;
&lt;br /&gt;
The form provides a clean, simple UI for creating and editing records.  &lt;br /&gt;
It must:&lt;br /&gt;
* include an &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; block to hide clutter&lt;br /&gt;
* include a &amp;lt;code&amp;gt;standard input|save&amp;lt;/code&amp;gt; button&lt;br /&gt;
* wrap fields inside a &amp;lt;code&amp;gt;for template&amp;lt;/code&amp;gt; block&lt;br /&gt;
&lt;br /&gt;
=== Structure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
Form for creating and editing EntityName pages.&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{{info&lt;br /&gt;
|no summary&lt;br /&gt;
|no preview&lt;br /&gt;
|no minor edit&lt;br /&gt;
|no watch&lt;br /&gt;
|no footer&lt;br /&gt;
}}}&lt;br /&gt;
&lt;br /&gt;
{{{for template|EntityName}}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;formtable&amp;quot;&lt;br /&gt;
! Field 1&lt;br /&gt;
| {{{field|field1|mandatory}}}&lt;br /&gt;
|-&lt;br /&gt;
! Field 2&lt;br /&gt;
| {{{field|field2|input type=textarea}}}&lt;br /&gt;
|-&lt;br /&gt;
! Field 3&lt;br /&gt;
| {{{field|field3|input type=datepicker}}}&lt;br /&gt;
|-&lt;br /&gt;
! Field 4&lt;br /&gt;
| {{{field|field4|input type=combobox|values from namespace=EntityName}}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{{standard input|save}}}&lt;br /&gt;
&lt;br /&gt;
{{{end template}}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; block must appear before the &amp;lt;code&amp;gt;for template&amp;lt;/code&amp;gt; block.&lt;br /&gt;
* The &amp;lt;code&amp;gt;standard input|save&amp;lt;/code&amp;gt; line is required; without it, Page Forms falls back to the MediaWiki editor footer.&lt;br /&gt;
* The form name must match the template name.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 3. Dashboard (Dashboard:EntityName) ==&lt;br /&gt;
&lt;br /&gt;
The dashboard lists all records and provides a clean entry point to the form.&lt;br /&gt;
&lt;br /&gt;
=== Structure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
= EntityName Dashboard =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Field1 !! Field2 !! Field3&lt;br /&gt;
{{#cargo_query:&lt;br /&gt;
 tables=TableName&lt;br /&gt;
 |fields=_pageName,field1,field2,field3&lt;br /&gt;
 |where=_pageNamespace=EntityNamespace&lt;br /&gt;
 |order by=field1&lt;br /&gt;
 |format=template&lt;br /&gt;
 |template=EntityRow&lt;br /&gt;
 |named args=yes&lt;br /&gt;
 |cache=no&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{#forminput:&lt;br /&gt;
 form=EntityName&lt;br /&gt;
 |namespace=EntityName&lt;br /&gt;
 |button text=➕ New EntityName&lt;br /&gt;
 |returnto=Dashboard:EntityName&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* The dashboard never links to &amp;lt;code&amp;gt;action=edit&amp;lt;/code&amp;gt;.&lt;br /&gt;
* All editing must go through Page Forms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 4. Row Template (Template:EntityRow) ==&lt;br /&gt;
&lt;br /&gt;
This template defines how each row in the dashboard table is rendered.&lt;br /&gt;
&lt;br /&gt;
=== Structure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| {{#formlink:form=EntityName&lt;br /&gt;
    |target={{{_pageName}}}&lt;br /&gt;
    |link text={{{field1}}}&lt;br /&gt;
    |returnto=Dashboard:EntityName&lt;br /&gt;
  }}&lt;br /&gt;
| {{{field2}}}&lt;br /&gt;
| {{{field3}}}&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* The first column is the clickable link that opens the form editor.&lt;br /&gt;
* &amp;lt;code&amp;gt;#formlink&amp;lt;/code&amp;gt; ensures the user always enters &amp;lt;code&amp;gt;action=formedit&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 5. Workflow Summary ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a new record ===&lt;br /&gt;
* User clicks &amp;quot;New EntityName&amp;quot;&lt;br /&gt;
* URL: &amp;lt;code&amp;gt;Special:FormEdit/EntityName/EntityName:XYZ&amp;lt;/code&amp;gt;&lt;br /&gt;
* Clean Page Forms UI appears&lt;br /&gt;
* Data is stored via &amp;lt;code&amp;gt;#cargo_store&amp;lt;/code&amp;gt;&lt;br /&gt;
* Cargo table updates automatically&lt;br /&gt;
&lt;br /&gt;
=== Editing an existing record ===&lt;br /&gt;
* User clicks the code in the dashboard&lt;br /&gt;
* URL: &amp;lt;code&amp;gt;EntityName:XYZ?action=formedit&amp;lt;/code&amp;gt;&lt;br /&gt;
* Clean Page Forms UI appears&lt;br /&gt;
* Data updates in Cargo&lt;br /&gt;
&lt;br /&gt;
=== No user ever sees the MediaWiki editor. ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 6. Rules for Reuse ==&lt;br /&gt;
&lt;br /&gt;
To create a new module (e.g., Persons, Locations, Events):&lt;br /&gt;
&lt;br /&gt;
# Copy the Template pattern → adjust fields&lt;br /&gt;
# Copy the Form pattern → adjust fields&lt;br /&gt;
# Copy the Dashboard pattern → adjust table and row template&lt;br /&gt;
# Create a Row template using &amp;lt;code&amp;gt;#formlink&amp;lt;/code&amp;gt;&lt;br /&gt;
# Verify:&lt;br /&gt;
## Template name = Form name&lt;br /&gt;
## Cargo table name is unique&lt;br /&gt;
## Dashboard uses the correct namespace&lt;br /&gt;
## Form includes &amp;lt;code&amp;gt;standard input|save&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This pattern is stable, reproducible, and successor‑friendly.&lt;/div&gt;</summary>
		<author><name>Mngr</name></author>
	</entry>
</feed>