Help:Saintapedia Graph
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{#seo:|title=Help:Saintapedia Graph}}
{{DISPLAYTITLE:Help:Saintapedia Graph}}
{{Saintapedia Graph examples}}
'''Saintapedia Graph''' turns [[mw:Extension:Cargo|Cargo]] tables into interactive [https://mermaid.js.org/ Mermaid] flowcharts. Typical uses on this wiki are '''organization charts''' (who reports to whom) and '''funding networks''' (who funded whom). Any parent/child or source/target relationship stored in Cargo can be drawn the same way.
{{note|This page documents '''Saintapedia Graph 0.2.5'''. Parser-function errors and warnings are '''English only'''; other interface languages still show English for those messages.}}
__TOC__
== What you need ==
* This extension (Saintapedia Graph)
* [[mw:Extension:Cargo|Extension:Cargo]] — data comes from Cargo tables, not from wikitext lists
* MediaWiki 1.39+ / PHP 8.1+
'''You do ''not'' need Extension:Mermaid.''' Saintapedia Graph ships Mermaid 10.9.1 and renders diagrams itself.
Editors write a parser function (or a wrapper template). The extension runs one or two Cargo queries, builds a flowchart, and the browser draws it.
== Quick start ==
=== 1. Have Cargo tables ===
Any parent/child or source/target Cargo table works — dioceses, parishes, religious orders, foundations, not only a table named Organizations.
The bundled sample (import with <code>--examples</code>) uses '''OrgDemo''' / '''GrantDemo''' so it will not overwrite a wiki's Organization or Grant templates:
<pre>
{{#cargo_declare:_table=OrgDemo
|Name=String
|ParentOrg=Page
|Type=String
|Country=String
|Website=URL
}}
</pre>
<pre>
{{#cargo_declare:_table=GrantDemo
|Funder=Page
|Recipient=Page
|Amount=Float
|Year=Integer
|Program=String
}}
</pre>
On a live diocese wiki, declare your own tables (for example <code>Parishes</code> with a Page-type <code>Diocese</code> column) and pass <code>table=Parishes</code> / <code>parent=Diocese</code> to [[Template:Org chart]].
Store rows with <code>#cargo_store</code> (usually from an infobox template). Create or recreate tables at [[Special:CargoTables]] if they are missing.
Use '''Page'''-type fields for parents, funders, and recipients so node clicks open the right wiki page.
=== 2. Org chart ===
<pre>
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type,Country
|parent_field=ParentOrg
|node_id=Name
|style_by=Type
|subgraph_by=Country
|direction=TD
|clickable=yes
}}
</pre>
Edges are '''parent → child''' (archdiocese → diocese → parish, or any reporting line).
Shorter: <code><nowiki>{{Org chart|table=OrgDemo|style=Type|subgraph=Country}}</nowiki></code>
Real parishes: <code><nowiki>{{Org chart|table=Parishes|parent=Diocese|id=_pageName}}</nowiki></code>
=== 3. Funding network ===
Prefer '''dual-table''' mode when organizations live in one table and grants in another (colors and groups then come from the organization row, not the grant row):
<pre>
{{#saintapedia_graph:
nodes_table=OrgDemo
|nodes_fields=_pageName=Name,Type,Country
|edges_table=GrantDemo
|edges_fields=Funder,Recipient,Amount
|edges_where=Year>=2023
|node_id=_pageName
|node_label=Name
|source_field=Funder
|target_field=Recipient
|edge_label=Amount
|style_by=Type
|subgraph_by=Country
|direction=LR
|theme=forest
}}
</pre>
Shorter: <code><nowiki>{{Funding network|nodes=OrgDemo|edges=GrantDemo|style=Type|subgraph=Country|edges_where=Year>=2023}}</nowiki></code>
If you only have one table of links, use '''edge''' mode (one query):
<pre>
{{#saintapedia_graph:
tables=Grants
|fields=Funder,Recipient,Amount,Year
|source_field=Funder
|target_field=Recipient
|edge_label=Amount
|direction=LR
|theme=forest
}}
</pre>
=== Live examples ===
Each example is a '''Help:''' subpage with the wikitext and (when the sample Cargo tables exist) the live graph on the same page. Start at [[Help:Saintapedia Graph/Examples]]. [[Template:Org chart]] does not declare a Cargo table — create tables from the Demo templates ([[Help:Saintapedia Graph/Create tables]]).
== How to pick a mode ==
Each diagram is exactly '''one''' mode. Mixing <code>parent_field</code> with <code>source_field</code>/<code>target_field</code> is an error. Dual mode is chosen when you set <code>nodes_table</code> and <code>edges_table</code>.
{| class="wikitable"
! Mode
! When to use
! Required
! Edge direction
! Cargo queries
|-
| '''Hierarchy'''
| Org charts, subsidiaries, “reports to”
| <code>tables=</code> + <code>parent_field=</code>
| Parent → child
| 1
|-
| '''Edge'''
| Links stored in one table (grant rows, ownership rows)
| <code>tables=</code> + <code>source_field=</code> + <code>target_field=</code>
| Source → target
| 1
|-
| '''Dual-table'''
| Nodes in one table, edges in another (typical funding network)
| <code>nodes_table=</code> + <code>edges_table=</code> + source/target fields
| Source → target
| '''2''' (counts as two expensive parser functions)
|}
=== Hierarchy details ===
* Each Cargo row is one child node.
* <code>parent_field</code> names the parent. Empty parent = a root.
* If the parent is not itself a row, the extension still draws it (label = the parent value).
* A synthetic parent can inherit a subgraph box from its first child.
=== Edge details ===
* Each row is one arrow from <code>source_field</code> to <code>target_field</code>.
* Missing source or target cells are skipped.
* If you set <code>style_by</code> / <code>subgraph_by</code> in this mode, those values come from the '''same row as the edge''' and are applied to the source node (the target only inherits the subgraph).
=== Dual-table details ===
* First query loads nodes (labels, click targets, colors, groups).
* Second query loads edges. Endpoints that are not in the node query are still drawn (plain label, no style).
* Styles are '''not''' overwritten by the edge query.
* Both queries use the same <code>limit=</code> (see [[#Limits|Limits]]).
==== Matching nodes to edges ====
Grant <code>Funder</code> / <code>Recipient</code> fields are usually '''page titles'''. Set:
<pre>
|node_id=_pageName
|node_label=Name
</pre>
so “Ford Foundation” on a grant matches the organization page. If you set <code>node_id=Name</code>, the Name cell must be identical to the page title.
== Parser functions ==
Primary: <code><nowiki>{{#saintapedia_graph: … }}</nowiki></code>
Alias: <code><nowiki>{{#cargo_mermaid: … }}</nowiki></code> (same parameters)
Parameter names are case-insensitive. Spaces and hyphens become underscores (<code>join on</code> = <code>join_on</code>, <code>nodes-table</code> = <code>nodes_table</code>).
=== Cargo query (hierarchy and edge) ===
Same idea as <code>#cargo_query</code>.
{| class="wikitable"
! Parameter
! Description
|-
| <code>tables</code> / <code>table</code>
| Required. One or more Cargo tables, comma-separated.
|-
| <code>fields</code>
| Columns to select. The extension adds any extra columns it still needs (<code>parent_field</code>, <code>style_by</code>, …).
|-
| <code>where</code>
| Filter (Cargo/SQL-style).
|-
| <code>join on</code>
| Join conditions. Required when <code>tables=</code> lists more than one table.
|-
| <code>group by</code> / <code>having</code>
| Aggregation (Cargo rules).
|-
| <code>order by</code>
| Sort.
|-
| <code>limit</code>
| Max rows '''per Cargo query'''. See [[#Limits|Limits]].
|-
| <code>offset</code>
| Skip initial rows (single-query modes). Dual-mode edge query always starts at offset 0.
|}
=== Dual-table query ===
{| class="wikitable"
! Parameter
! Description
|-
| <code>nodes_table</code> / <code>edges_table</code>
| Required together.
|-
| <code>nodes_fields</code> / <code>edges_fields</code>
| Columns for each query. Empty <code>edges_fields</code> defaults to source, target, and optional edge label.
|-
| <code>nodes_where</code> / <code>edges_where</code>
| Per-query filters.
|-
| <code>nodes_join_on</code> / <code>edges_join_on</code>
| Per-query joins.
|-
| <code>nodes_order_by</code> / <code>edges_order_by</code>
| Per-query sort.
|}
=== Diagram ===
{| class="wikitable"
! Parameter
! Default
! Description
|-
| <code>direction</code>
| site default, usually <code>TD</code>
| <code>TD</code> (top-down; <code>TB</code> is accepted as the same), <code>LR</code>, <code>BT</code>, <code>RL</code>
|-
| <code>node_id</code>
| <code>_pageName</code>
| Field that uniquely identifies a node
|-
| <code>node_label</code>
| same as <code>node_id</code> (dual mode may pick <code>Name</code> if that column is in <code>nodes_fields</code>)
| Text on the node
|-
| <code>page_field</code>
| hierarchy/dual: <code>_pageName</code>; edge: the endpoint value itself
| Wiki title used for the click link
|-
| <code>parent_field</code>
| —
| Hierarchy only
|-
| <code>source_field</code> / <code>target_field</code>
| —
| Edge and dual (both required)
|-
| <code>edge_label</code>
| —
| Optional caption on the arrow (truncated around 64 characters)
|-
| <code>style_by</code>
| —
| Color nodes by this column (must exist)
|-
| <code>subgraph_by</code>
| —
| Group nodes in a box by this column (must exist)
|-
| <code>link_style</code>
| <code>--></code>
| <code>--></code>, <code>-.-></code>, <code>==></code>, <code>---</code>, <code><--></code> (anything else becomes <code>--></code>)
|-
| <code>clickable</code>
| site default, usually <code>yes</code>
| <code>yes</code>/<code>no</code> (also <code>true</code>/<code>false</code>, <code>1</code>/<code>0</code>, <code>on</code>/<code>off</code>)
|-
| <code>theme</code>
| site default, usually <code>default</code>
| <code>default</code>, <code>base</code>, <code>dark</code>, <code>forest</code>, <code>neutral</code>. Unknown values fall back to <code>default</code> and warn.
|-
| <code>warn_cycles</code>
| site default, usually <code>yes</code>
| Warn when the directed graph contains a cycle
|-
| <code>break_cycles</code>
| site default, usually <code>no</code>
| Drop edges that close cycles (keeps a DAG-like picture)
|-
| <code>format</code>
| <code>mermaid</code>
| <code>mermaid</code> = draw; <code>raw</code> / <code>source</code> / <code>text</code> = print Mermaid source
|}
== Templates ==
Imported by the [[#Installing the help page|maintenance script]] (or by hand from <code>templates/</code>).
=== <code><nowiki>{{Org chart}}</nowiki></code> ===
Hierarchy. Default table is Organizations; pass <code>table=OrgDemo</code> for the sample or <code>table=Parishes</code> for a real diocese wiki.
{| class="wikitable"
! Argument
! Default
! Maps to
|-
| <code>table</code>
| Organizations
| <code>tables=</code>
|-
| <code>parent</code>
| ParentOrg
| <code>parent_field=</code>
|-
| <code>id</code>
| Name
| <code>node_id=</code>
|-
| <code>label</code>
| same as <code>id</code>
| <code>node_label=</code>
|-
| <code>style</code>
| —
| <code>style_by=</code> (real column)
|-
| <code>subgraph</code>
| —
| <code>subgraph_by=</code> (real column)
|-
| <code>where</code>
| —
| <code>where=</code>
|-
| <code>order</code>
| the id field
| <code>order by=</code>
|-
| <code>direction</code>
| TD
| <code>direction=</code>
|-
| <code>limit</code>
| 200
| <code>limit=</code>
|-
| <code>clickable</code>
| yes
| <code>clickable=</code>
|-
| <code>theme</code>
| default
| <code>theme=</code>
|-
| <code>warn_cycles</code> / <code>break_cycles</code>
| yes / no
| same
|}
=== <code><nowiki>{{Funding network}}</nowiki></code> ===
Dual-table nodes + edges. Defaults are Organizations / Grants; pass <code>nodes=OrgDemo</code> and <code>edges=GrantDemo</code> for the sample.
{| class="wikitable"
! Argument
! Default
! Maps to
|-
| <code>nodes</code> / <code>edges</code>
| Organizations / Grants
| <code>nodes_table=</code> / <code>edges_table=</code>
|-
| <code>source</code> / <code>target</code>
| Funder / Recipient
| <code>source_field=</code> / <code>target_field=</code>
|-
| <code>id</code>
| <code>_pageName</code>
| <code>node_id=</code>
|-
| <code>label</code>
| Name
| <code>node_label=</code>
|-
| <code>page</code>
| <code>_pageName</code>
| <code>page_field=</code>
|-
| <code>edge_label</code>
| Amount
| <code>edge_label=</code>
|-
| <code>style</code> / <code>subgraph</code>
| —
| node-table columns
|-
| <code>edges_where</code> or <code>where</code>
| —
| <code>edges_where=</code>
|-
| <code>nodes_where</code>
| —
| <code>nodes_where=</code>
|-
| <code>direction</code>
| LR
| <code>direction=</code>
|-
| <code>theme</code>
| forest
| <code>theme=</code>
|-
| <code>limit</code>
| 300
| <code>limit=</code> (both queries)
|-
| <code>clickable</code>, <code>warn_cycles</code>, <code>break_cycles</code>
| yes / yes / no
| same
|}
== Colors, groups, and themes ==
* <code>style_by</code> assigns a fill from the site palette (ten colors by default) to each distinct value.
* <code>subgraph_by</code> draws a labeled box around nodes that share a value (country, program, …).
* <code>theme=</code> is a Mermaid built-in: <code>default</code>, <code>base</code>, <code>dark</code>, <code>forest</code>, <code>neutral</code>. Typos such as <code>forset</code> still render (theme <code>default</code>) and show a warning.
== Clicks ==
With <code>clickable=yes</code>, a node opens the wiki page from <code>page_field</code> (or the node id). Links are '''same-origin paths only''' (<code>/wiki/…</code> or <code>index.php?…</code>). Absolute and protocol-relative URLs are dropped.
JavaScript is required for the interactive SVG. Without JS you get a <code><noscript></code> copy of the Mermaid source.
== Limits ==
<code>limit=</code> is '''per Cargo query''':
* Default when omitted: <code>$wgSaintapediaGraphDefaultLimit</code> (usually 500).
* Hard cap: <code>$wgSaintapediaGraphMaxLimit</code> (usually 1000).
* Values below 1 (including negatives) become 1.
* If the requested number is rewritten, a warning appears: <code>limit $1 reduced to $2; the graph may be missing rows.</code>
* Dual mode runs '''two''' queries at that same cap, so a page can fetch up to 2× the max (nodes + edges). Dual mode also prints a second warning line that each query is capped.
Each diagram counts as one '''expensive''' parser function; dual mode counts as two. Too many on one page hits <code>$wgExpensiveParserFunctionLimit</code>.
== Cycles ==
Directed loops (A→B→A, or longer) are detected after the graph is built.
* <code>warn_cycles=yes</code> (default) prints how many cycles were found.
* <code>break_cycles=yes</code> drops the back-edges that close those cycles, then optionally reports how many edges were removed.
The cycle count can overlap on dense graphs; treat it as a signal, not a precise census. Path labels still use internal node ids, not display names.
== One query with several tables vs dual mode ==
These are different:
# <code>tables=Grants,Organizations</code> + <code>join on=…</code> — '''one''' result set. In edge mode each row is an edge; node names come from source/target. A join can enrich filters or labels but does not give each node its own Type/Country unless those columns are on the row.
# <code>nodes_table</code> + <code>edges_table</code> — '''two''' queries. Use this when styles/groups live on the organization table.
Single-query join example:
<pre>
{{#saintapedia_graph:
tables=Grants,Organizations
|join on=Grants.Funder=Organizations._pageName
|fields=Grants.Funder,Grants.Recipient,Grants.Amount,Organizations.Type
|source_field=Funder
|target_field=Recipient
|edge_label=Amount
|direction=LR
|limit=300
}}
</pre>
Not in this version: expand “everyone within N steps of X”, Sankey, hover field tooltips, or SVG/PNG export.
== Debugging ==
* <code>format=raw</code> — print the generated Mermaid instead of drawing.
* After an extension update, hard-refresh (Ctrl+Shift+R) so the browser is not holding an old ResourceLoader module.
* Warnings render in a yellow box above the diagram; errors in a red box. Both are English.
== Troubleshooting ==
{| class="wikitable"
! Symptom
! What to try
|-
| “tables parameter is required”
| Set <code>tables=</code>, or both <code>nodes_table</code> and <code>edges_table</code>
|-
| Missing mode / mixed modes
| Hierarchy '''or''' edge '''or''' dual — not parent plus source/target
|-
| Dual mode missing a table
| Both node and edge tables are required
|-
| No results
| [[Special:CargoTables]]; re-save pages that <code>#cargo_store</code>
|-
| Nodes and edges do not match
| Dual mode: <code>node_id=_pageName</code> so endpoints equal page titles
|-
| Unknown theme warning
| Use <code>default</code>, <code>base</code>, <code>dark</code>, <code>forest</code>, or <code>neutral</code>
|-
| Limit reduced warning
| Requested <code>limit=</code> was rewritten (over the site max, or below 1)
|-
| Cycle warning
| The directed graph loops. <code>break_cycles=yes</code> drops back-edges
|-
| “Diagram failed to render”
| Hard-refresh; <code>format=raw</code>; browser console
|-
| Too many expensive parser functions
| Fewer graphs per page (dual = two), or raise <code>$wgExpensiveParserFunctionLimit</code>
|-
| Cargo join error
| Every table in <code>tables=</code> must appear in <code>join on=</code>
|-
| Clicks do nothing
| Need JS; <code>clickable=yes</code>; page title must exist; only local paths are emitted
|-
| Diagram unstyled
| Site CSP may block Mermaid’s inline SVG styles — ask an admin (see README)
|}
== Installing the help page ==
=== Special:Import (no shell) ===
Download an XML dump from GitHub and import it at [[Special:Import]] (sysop / import right):
* [https://raw.githubusercontent.com/Saintapedia/SaintapediaGraph/main/docs/import/SaintapediaGraph-help.xml SaintapediaGraph-help.xml] — this Help page, [[Template:Org chart]], [[Template:Funding network]], [[Template:Saintapedia Graph examples]]
* [https://raw.githubusercontent.com/Saintapedia/SaintapediaGraph/main/docs/import/SaintapediaGraph-examples.xml SaintapediaGraph-examples.xml] — help '''plus''' OrgDemo / GrantDemo, the Demo … pages, and the [[Help:Saintapedia Graph/Examples|example series]]
Use the '''raw.githubusercontent.com''' link (the file must start with <code><?xml version="1.0"</code>). Do '''not''' save the GitHub file ''page'' — that is HTML and Special:Import fails with <code>crossorigin</code>. Right-click the raw link → Save as → <code>.xml</code>, then Special:Import → upload. Assign the edits to your account. After the examples dump, recreate Cargo:
<pre>
php extensions/Cargo/maintenance/cargoRecreateData.php --table OrgDemo
php extensions/Cargo/maintenance/cargoRecreateData.php --table GrantDemo
</pre>
=== Maintenance script ===
Admins (from the wiki root):
<pre>
php maintenance/run.php SaintapediaGraph:importPages
</pre>
MediaWiki 1.39:
<pre>
php extensions/SaintapediaGraph/maintenance/importPages.php
</pre>
<code>--dry-run</code> lists create/update/skip. <code>--overwrite</code> replaces existing Help and templates. <code>--examples</code> also imports OrgDemo / GrantDemo and the [[Help:Saintapedia Graph/Examples|Help: example series]] (does '''not''' create Organization or Grant templates).
That writes:
* [[Help:Saintapedia Graph]] (this page)
* [[Template:Org chart]]
* [[Template:Funding network]]
* [[Template:Saintapedia Graph examples]] (right-hand series table)
With <code>--examples</code>, also [[Template:OrgDemo]], [[Template:GrantDemo]], the Demo … diocese/parish pages, <code>GrantDemo:</code> rows, and the demo page. Then recreate Cargo if needed:
<pre>
php extensions/Cargo/maintenance/cargoRecreateData.php --table OrgDemo
php extensions/Cargo/maintenance/cargoRecreateData.php --table GrantDemo
</pre>
The public mediawiki.org listing is a separate paste file in the repo (<code>docs/mediawiki.org-Extension-SaintapediaGraph.wikitext</code>); it is not imported here.
== Configuration (admins) ==
<code>LocalSettings.php</code> / Canasta (after Cargo):
<pre>
wfLoadExtension( 'Cargo' );
wfLoadExtension( 'SaintapediaGraph' );
$wgSaintapediaGraphDefaultDirection = 'TD';
$wgSaintapediaGraphDefaultLimit = 500;
$wgSaintapediaGraphMaxLimit = 1000;
$wgSaintapediaGraphClickable = true;
$wgSaintapediaGraphDefaultTheme = 'default';
$wgSaintapediaGraphUseStandaloneRenderer = true;
$wgSaintapediaGraphWarnCycles = true;
$wgSaintapediaGraphBreakCycles = false;
</pre>
{| class="wikitable"
! Variable
! Default
! Meaning
|-
| <code>$wgSaintapediaGraphDefaultDirection</code>
| <code>TD</code>
| Layout when <code>direction=</code> is omitted
|-
| <code>$wgSaintapediaGraphDefaultLimit</code>
| <code>500</code>
| Default rows per Cargo query
|-
| <code>$wgSaintapediaGraphMaxLimit</code>
| <code>1000</code>
| Hard cap '''per query''' (dual mode can fetch 2×)
|-
| <code>$wgSaintapediaGraphClickable</code>
| <code>true</code>
| Default for <code>clickable=</code>
|-
| <code>$wgSaintapediaGraphDefaultTheme</code>
| <code>default</code>
| Default Mermaid theme
|-
| <code>$wgSaintapediaGraphUseStandaloneRenderer</code>
| <code>true</code>
| <code>false</code> prints source only (no JS)
|-
| <code>$wgSaintapediaGraphWarnCycles</code>
| <code>true</code>
| Default for <code>warn_cycles=</code>
|-
| <code>$wgSaintapediaGraphBreakCycles</code>
| <code>false</code>
| Default for <code>break_cycles=</code>
|-
| <code>$wgSaintapediaGraphStylePalette</code>
| 10 hex colors
| Fills for <code>style_by</code>
|}
The folder name on disk must be <code>extensions/SaintapediaGraph</code> (ResourceLoader path). No <code>update.php</code> run is required.
Scripts are same-origin ResourceLoader (bundled Mermaid). No CDN. UI strings are English-only. CSP notes are in the extension README on GitHub.
== Related pages ==
* [[Help:Saintapedia Graph/Examples]] — one Help page per use (code + live graph)
* [[Saintapedia Graph smoke]] — warning cases (local QA)
* [[Special:CargoTables]] — declare / recreate Cargo tables
* [[mw:Extension:Cargo|Cargo documentation]]
* [[mw:Extension:SaintapediaGraph|Extension:SaintapediaGraph]] on mediawiki.org
* [https://github.com/Saintapedia/SaintapediaGraph SaintapediaGraph on GitHub]
[[Category:Help]]
[[Category:Cargo]]
[[Category:Saintapedia Graph]]
Template:Org chart
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:Org chart''' — wrapper for [[Help:Saintapedia Graph]] hierarchy diagrams.
<code>style</code> / <code>subgraph</code> must be real Cargo columns (e.g. Type, Country). Pass <code>table=</code> for Parishes, OrgDemo, or any parent/child table.
<pre>
{{Org chart
|table=OrgDemo
|parent=ParentOrg
|id=Name
|label=Name
|style=Type
|subgraph=Country
|where=
|direction=TD
|limit=200
}}
</pre>
[[Category:Saintapedia Graph templates]]
</noinclude><includeonly>{{#saintapedia_graph:
tables={{{table|Organizations}}}
|fields=_pageName={{{id|Name}}},{{{parent|ParentOrg}}}{{#if:{{{style|}}}|,{{{style}}}}}{{#if:{{{subgraph|}}}|,{{{subgraph}}}}}
|where={{{where|}}}
|order by={{{order|{{{id|Name}}}}}}
|limit={{{limit|200}}}
|direction={{{direction|TD}}}
|node_id={{{id|Name}}}
|node_label={{{label|{{{id|Name}}}}}}
|parent_field={{{parent|ParentOrg}}}
|style_by={{{style|}}}
|subgraph_by={{{subgraph|}}}
|clickable={{{clickable|yes}}}
|theme={{{theme|default}}}
|warn_cycles={{{warn_cycles|yes}}}
|break_cycles={{{break_cycles|no}}}
}}</includeonly>
Template:Funding network
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:Funding network''' — dual-table funding diagram for [[Help:Saintapedia Graph]]
(nodes from one table, edges from another). Defaults are Organizations / Grants; the bundled sample uses OrgDemo / GrantDemo.
Uses <code>node_id=_pageName</code> by default so Funder/Recipient page titles match.
<code>style</code> / <code>subgraph</code> must be real Cargo columns on the nodes table.
<pre>
{{Funding network
|nodes=OrgDemo
|edges=GrantDemo
|style=Type
|subgraph=Country
|source=Funder
|target=Recipient
|edge_label=Amount
|edges_where=Year>=2023
|direction=LR
|theme=forest
|limit=300
}}
</pre>
[[Category:Saintapedia Graph templates]]
</noinclude><includeonly>{{#saintapedia_graph:
nodes_table={{{nodes|Organizations}}}
|nodes_fields=_pageName,Name{{#if:{{{style|}}}|,{{{style}}}}}{{#if:{{{subgraph|}}}|,{{{subgraph}}}}}
|nodes_where={{{nodes_where|}}}
|edges_table={{{edges|Grants}}}
|edges_fields={{{source|Funder}}},{{{target|Recipient}}}{{#if:{{{edge_label|Amount}}}|,{{{edge_label|Amount}}}}}
|edges_where={{{edges_where|{{{where|}}}}}}
|node_id={{{id|_pageName}}}
|node_label={{{label|Name}}}
|page_field={{{page|_pageName}}}
|source_field={{{source|Funder}}}
|target_field={{{target|Recipient}}}
|edge_label={{{edge_label|Amount}}}
|style_by={{{style|}}}
|subgraph_by={{{subgraph|}}}
|direction={{{direction|LR}}}
|limit={{{limit|300}}}
|clickable={{{clickable|yes}}}
|theme={{{theme|forest}}}
|warn_cycles={{{warn_cycles|yes}}}
|break_cycles={{{break_cycles|no}}}
}}</includeonly>
Template:Saintapedia Graph examples
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
Right-hand nav for [[Help:Saintapedia Graph]] and the example series.
Transclude with <code><nowiki>{{Saintapedia Graph examples}}</nowiki></code>.
</noinclude>{| class="wikitable" style="float:right; clear:right; margin:0 0 1em 1.5em; width:16em; font-size:90%;"
! [[Help:Saintapedia Graph|Saintapedia Graph]]
|-
| [[Help:Saintapedia Graph|Help (reference)]]
|-
| [[Help:Saintapedia Graph/Examples|Examples index]]
|-
| [[Help:Saintapedia Graph/Create tables|Create Cargo tables]]
|-
! Live on OrgDemo
|-
| [[Help:Saintapedia Graph/Province|Province]]
|-
| [[Help:Saintapedia Graph/One diocese|One diocese]]
|-
| [[Help:Saintapedia Graph/By country|By country]]
|-
| [[Help:Saintapedia Graph/Funding|Funding]]
|-
| [[Help:Saintapedia Graph/One funder|One funder]]
|-
| [[Help:Saintapedia Graph/Templates|Templates]]
|-
| [[Help:Saintapedia Graph/Raw source|Raw source]]
|-
! Your own tables
|-
| [[Help:Saintapedia Graph/Deaneries|Deaneries]]
|-
| [[Help:Saintapedia Graph/Religious houses|Religious houses]]
|-
| [[Help:Saintapedia Graph/Schools|Schools]]
|-
| [[Help:Saintapedia Graph/Episcopal lineage|Episcopal lineage]]
|-
| [[Help:Saintapedia Graph/Twin parishes|Twin parishes]]
|-
| [[Help:Saintapedia Graph/Patron saints|Patron saints]]
|-
| [[Help:Saintapedia Graph/Successors|Successors]]
|}
<includeonly>{{#if:{{{break|}}}|<br style="clear:both;" />}}</includeonly>
Template:OrgDemo
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:OrgDemo''' is a '''Cargo template'''. It declares and stores the '''OrgDemo''' table (not Organization).
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below. After that, [[Special:CargoTables/OrgDemo]] should list rows.
== Cargo declaration ==
{{#cargo_declare:_table=OrgDemo
|Name=String
|ParentOrg=Page
|Type=String
|Country=String
|Website=URL
}}
</noinclude><includeonly>{{#cargo_store:_table=OrgDemo
|Name={{{Name|{{PAGENAME}}}}}
|ParentOrg={{{ParentOrg|}}}
|Type={{{Type|}}}
|Country={{{Country|}}}
|Website={{{Website|}}}
}}
'''{{{Name|{{PAGENAME}}}}}''' ({{{Type|}}}){{#if:{{{ParentOrg|}}}| — parent: [[{{{ParentOrg}}}]]}}{{#if:{{{Country|}}}| — {{{Country}}}}}
</includeonly>
Template:GrantDemo
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:GrantDemo''' is a '''Cargo template'''. It declares and stores the '''GrantDemo''' table (not Grant).
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below. After that, [[Special:CargoTables/GrantDemo]] should list rows.
== Cargo declaration ==
{{#cargo_declare:_table=GrantDemo
|Funder=Page
|Recipient=Page
|Amount=Float
|Year=Integer
|Program=String
}}
</noinclude><includeonly>{{#cargo_store:_table=GrantDemo
|Funder={{{Funder|}}}
|Recipient={{{Recipient|}}}
|Amount={{{Amount|}}}
|Year={{{Year|}}}
|Program={{{Program|}}}
}}
Grant: [[{{{Funder}}}]] → [[{{{Recipient}}}]] — {{{Amount|?}}} ({{{Year|}}}){{#if:{{{Program|}}}| — {{{Program}}}}}
</includeonly>
Template:DemoPlace
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:DemoPlace''' is a '''Cargo template''' for [[Help:Saintapedia Graph/Deaneries]] (table '''DemoPlace''').
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below.
== Cargo declaration ==
{{#cargo_declare:_table=DemoPlace
|ParentPlace=Page
|Kind=String
|Diocese=Page
}}
</noinclude><includeonly>{{#cargo_store:_table=DemoPlace
|ParentPlace={{{ParentPlace|}}}
|Kind={{{Kind|}}}
|Diocese={{{Diocese|}}}
}}
'''{{PAGENAME}}''' ({{{Kind|}}}){{#if:{{{ParentPlace|}}}| — parent: [[{{{ParentPlace}}}]]}}{{#if:{{{Diocese|}}}| — [[{{{Diocese}}}]]}}
</includeonly>
Template:DemoHouse
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:DemoHouse''' is a '''Cargo template''' for [[Help:Saintapedia Graph/Religious houses]] (table '''DemoHouse''').
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below.
== Cargo declaration ==
{{#cargo_declare:_table=DemoHouse
|Province=Page
|Institute=String
|Country=String
}}
</noinclude><includeonly>{{#cargo_store:_table=DemoHouse
|Province={{{Province|}}}
|Institute={{{Institute|}}}
|Country={{{Country|}}}
}}
'''{{PAGENAME}}''' ({{{Institute|}}}){{#if:{{{Province|}}}| — [[{{{Province}}}]]}}
</includeonly>
Template:DemoSchool
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:DemoSchool''' is a '''Cargo template''' for [[Help:Saintapedia Graph/Schools]] (table '''DemoSchool''').
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below.
== Cargo declaration ==
{{#cargo_declare:_table=DemoSchool
|Parish=Page
|Level=String
|City=String
|Diocese=Page
}}
</noinclude><includeonly>{{#cargo_store:_table=DemoSchool
|Parish={{{Parish|}}}
|Level={{{Level|}}}
|City={{{City|}}}
|Diocese={{{Diocese|}}}
}}
'''{{PAGENAME}}''' ({{{Level|}}}){{#if:{{{Parish|}}}| — parish: [[{{{Parish}}}]]}}
</includeonly>
Template:DemoBishop
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:DemoBishop''' is a '''Cargo template''' for [[Help:Saintapedia Graph/Episcopal lineage]] (table '''DemoBishop''').
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below.
== Cargo declaration ==
{{#cargo_declare:_table=DemoBishop
|Consecrator=Page
|See=String
}}
</noinclude><includeonly>{{#cargo_store:_table=DemoBishop
|Consecrator={{{Consecrator|}}}
|See={{{See|}}}
}}
'''{{PAGENAME}}'''{{#if:{{{See|}}}| — {{{See}}}}}{{#if:{{{Consecrator|}}}| — consecrated by [[{{{Consecrator}}}]]}}
</includeonly>
Template:DemoParishLink
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:DemoParishLink''' is a '''Cargo template''' for [[Help:Saintapedia Graph/Twin parishes]] (table '''DemoParishLink''').
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below.
== Cargo declaration ==
{{#cargo_declare:_table=DemoParishLink
|Parish=Page
|LinkedParish=Page
|Relation=String
}}
</noinclude><includeonly>{{#cargo_store:_table=DemoParishLink
|Parish={{{Parish|}}}
|LinkedParish={{{LinkedParish|}}}
|Relation={{{Relation|}}}
}}
[[{{{Parish|}}}]] {{#if:{{{Relation|}}}|({{{Relation}}})}} [[{{{LinkedParish|}}}]]
</includeonly>
Template:DemoPatronage
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:DemoPatronage''' is a '''Cargo template''' for [[Help:Saintapedia Graph/Patron saints]] (table '''DemoPatronage''').
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below.
== Cargo declaration ==
{{#cargo_declare:_table=DemoPatronage
|Saint=Page
|Place=Page
|Feast=String
}}
</noinclude><includeonly>{{#cargo_store:_table=DemoPatronage
|Saint={{{Saint|}}}
|Place={{{Place|}}}
|Feast={{{Feast|}}}
}}
[[{{{Saint|}}}]] — patron of [[{{{Place|}}}]]{{#if:{{{Feast|}}}| ({{{Feast}}})}}
</includeonly>
Template:DemoSuccessor
10
SaintapediaGraph
0
wikitext
text/x-wiki
<noinclude>
'''Template:DemoSuccessor''' is a '''Cargo template''' for [[Help:Saintapedia Graph/Successors]] (table '''DemoSuccessor''').
If you imported this page via Special:Import, edit and save once, then click '''Create data table''' under the declaration below.
== Cargo declaration ==
{{#cargo_declare:_table=DemoSuccessor
|SucceededBy=Page
|Country=String
}}
</noinclude><includeonly>{{#cargo_store:_table=DemoSuccessor
|SucceededBy={{{SucceededBy|}}}
|Country={{{Country|}}}
}}
'''{{PAGENAME}}'''{{#if:{{{SucceededBy|}}}| → [[{{{SucceededBy}}}]]}}
</includeonly>
Demo Archdiocese of Northbridge
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Archdiocese of Northbridge
|ParentOrg=
|Type=Archdiocese
|Country=United States
|Website=
}}
Demo Diocese of Eastfield
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Diocese of Eastfield
|ParentOrg=Demo Archdiocese of Northbridge
|Type=Diocese
|Country=United States
|Website=
}}
Demo Diocese of Westmere
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Diocese of Westmere
|ParentOrg=Demo Archdiocese of Northbridge
|Type=Diocese
|Country=United States
|Website=
}}
Demo Cathedral of St. Anne
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Cathedral of St. Anne
|ParentOrg=Demo Diocese of Eastfield
|Type=Parish
|Country=United States
|Website=
}}
Demo Parish of St. Brigid
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Parish of St. Brigid
|ParentOrg=Demo Diocese of Eastfield
|Type=Parish
|Country=United States
|Website=
}}
Demo Parish of St. Columba
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Parish of St. Columba
|ParentOrg=Demo Diocese of Westmere
|Type=Parish
|Country=United States
|Website=
}}
Demo Archdiocese of Harbourview
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Archdiocese of Harbourview
|ParentOrg=
|Type=Archdiocese
|Country=Canada
|Website=
}}
Demo Parish of Our Lady of the Harbor
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Parish of Our Lady of the Harbor
|ParentOrg=Demo Archdiocese of Harbourview
|Type=Parish
|Country=Canada
|Website=
}}
Demo Sisters of Mercy Outreach
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Sisters of Mercy Outreach
|ParentOrg=Demo Archdiocese of Northbridge
|Type=Religious order
|Country=United States
|Website=
}}
Demo Catholic Community Foundation
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{OrgDemo
|Name=Demo Catholic Community Foundation
|ParentOrg=
|Type=Foundation
|Country=United States
|Website=
}}
GrantDemo:CCF St Anne 2024
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{GrantDemo
|Funder=Demo Catholic Community Foundation
|Recipient=Demo Cathedral of St. Anne
|Amount=150000
|Year=2024
|Program=Cathedral restoration
}}
GrantDemo:CCF St Brigid 2024
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{GrantDemo
|Funder=Demo Catholic Community Foundation
|Recipient=Demo Parish of St. Brigid
|Amount=40000
|Year=2024
|Program=Religious education
}}
GrantDemo:CCF Eastfield 2023
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{GrantDemo
|Funder=Demo Catholic Community Foundation
|Recipient=Demo Diocese of Eastfield
|Amount=200000
|Year=2023
|Program=Diocesan ministries
}}
GrantDemo:Northbridge Columba 2024
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{GrantDemo
|Funder=Demo Archdiocese of Northbridge
|Recipient=Demo Parish of St. Columba
|Amount=25000
|Year=2024
|Program=Formation
}}
GrantDemo:Mercy Harbor 2023
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{GrantDemo
|Funder=Demo Sisters of Mercy Outreach
|Recipient=Demo Parish of Our Lady of the Harbor
|Amount=18000
|Year=2023
|Program=Mercy fund
}}
GrantDemo:CCF Harbourview 2024
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{GrantDemo
|Funder=Demo Catholic Community Foundation
|Recipient=Demo Archdiocese of Harbourview
|Amount=90000
|Year=2024
|Program=Seminary
}}
GrantDemo:Harbourview Harbor 2024
0
SaintapediaGraph
0
wikitext
text/x-wiki
{{GrantDemo
|Funder=Demo Archdiocese of Harbourview
|Recipient=Demo Parish of Our Lady of the Harbor
|Amount=30000
|Year=2024
|Program=Parish support
}}
Help:Saintapedia Graph/Examples
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Examples}}
{{Saintapedia Graph examples}}
Each page below has the '''wikitext''' and, when the sample Cargo tables exist, a '''live graph''' on the same page. [[Template:Org chart]] is not a Cargo template — create tables from [[Help:Saintapedia Graph/Create tables]].
{| class="wikitable"
! Page
! Mode
! Live sample?
|-
| [[Help:Saintapedia Graph/Province|Province]]
| Hierarchy — archdiocese → diocese → parish
| Yes (OrgDemo)
|-
| [[Help:Saintapedia Graph/One diocese|One diocese]]
| Hierarchy + <code>where=</code>
| Yes (Eastfield)
|-
| [[Help:Saintapedia Graph/By country|By country]]
| Hierarchy + <code>subgraph_by</code>
| Yes
|-
| [[Help:Saintapedia Graph/Funding|Funding]]
| Dual-table grants
| Yes (GrantDemo)
|-
| [[Help:Saintapedia Graph/One funder|One funder]]
| Edge + <code>where=</code>
| Yes
|-
| [[Help:Saintapedia Graph/Templates|Templates]]
| <code><nowiki>{{Org chart}}</nowiki></code> / <code><nowiki>{{Funding network}}</nowiki></code>
| Yes
|-
| [[Help:Saintapedia Graph/Raw source|Raw source]]
| <code>format=raw</code>
| Yes
|-
| [[Help:Saintapedia Graph/Deaneries|Deaneries]]
| Hierarchy
| [[Template:DemoPlace]] — create table, then add rows
|-
| [[Help:Saintapedia Graph/Religious houses|Religious houses]]
| Hierarchy
| [[Template:DemoHouse]]
|-
| [[Help:Saintapedia Graph/Schools|Schools]]
| Hierarchy
| [[Template:DemoSchool]]
|-
| [[Help:Saintapedia Graph/Episcopal lineage|Episcopal lineage]]
| Hierarchy
| [[Template:DemoBishop]]
|-
| [[Help:Saintapedia Graph/Twin parishes|Twin parishes]]
| Edge
| [[Template:DemoParishLink]]
|-
| [[Help:Saintapedia Graph/Patron saints|Patron saints]]
| Edge
| [[Template:DemoPatronage]]
|-
| [[Help:Saintapedia Graph/Successors|Successors]]
| Edge
| [[Template:DemoSuccessor]]
|}
Sample tables are '''OrgDemo''' / '''GrantDemo''' so they do not replace Organization or Grant. On a real diocese wiki, change the table and field names (for example <code>table=Parishes</code>, <code>parent=Diocese</code>).
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Create tables
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Create tables}}
{{Saintapedia Graph examples}}
[[Template:Org chart]] and [[Template:Funding network]] are '''graph wrappers'''. They do not declare Cargo tables.
Each sample table is a '''Cargo template''' with <code>#cargo_declare</code> (on the template page) and <code>#cargo_store</code> (when you transclude it). Special:Import copies the wikitext only — Cargo does not create the SQL table until you do this:
# Open the template (list below).
# If you just imported it, click '''Edit''' → '''Save''' (no changes needed). That registers the declaration.
# On the template page, under '''Cargo declaration''', click '''Create data table''' (or '''Recreate data''' if it already exists).
# Confirm at [[Special:CargoTables]].
You need the <code>recreatecargodata</code> right (usually sysop).
{| class="wikitable"
! Cargo template
! Table
! Used on
|-
| [[Template:OrgDemo]]
| OrgDemo
| [[Help:Saintapedia Graph/Province|Province]], one diocese, by country, funding nodes
|-
| [[Template:GrantDemo]]
| GrantDemo
| [[Help:Saintapedia Graph/Funding|Funding]], one funder
|-
| [[Template:DemoPlace]]
| DemoPlace
| [[Help:Saintapedia Graph/Deaneries|Deaneries]]
|-
| [[Template:DemoHouse]]
| DemoHouse
| [[Help:Saintapedia Graph/Religious houses|Religious houses]]
|-
| [[Template:DemoSchool]]
| DemoSchool
| [[Help:Saintapedia Graph/Schools|Schools]]
|-
| [[Template:DemoBishop]]
| DemoBishop
| [[Help:Saintapedia Graph/Episcopal lineage|Episcopal lineage]]
|-
| [[Template:DemoParishLink]]
| DemoParishLink
| [[Help:Saintapedia Graph/Twin parishes|Twin parishes]]
|-
| [[Template:DemoPatronage]]
| DemoPatronage
| [[Help:Saintapedia Graph/Patron saints|Patron saints]]
|-
| [[Template:DemoSuccessor]]
| DemoSuccessor
| [[Help:Saintapedia Graph/Successors|Successors]]
|}
Names are all <code>Demo…</code> / OrgDemo / GrantDemo so they will not replace Parishes, Organizations, or Grant on a live wiki.
If the wiki has shell access, this creates every sample table in one go:
<pre>
php extensions/Cargo/maintenance/cargoRecreateData.php --table OrgDemo
php extensions/Cargo/maintenance/cargoRecreateData.php --table GrantDemo
php extensions/Cargo/maintenance/cargoRecreateData.php --table DemoPlace
php extensions/Cargo/maintenance/cargoRecreateData.php --table DemoHouse
php extensions/Cargo/maintenance/cargoRecreateData.php --table DemoSchool
php extensions/Cargo/maintenance/cargoRecreateData.php --table DemoBishop
php extensions/Cargo/maintenance/cargoRecreateData.php --table DemoParishLink
php extensions/Cargo/maintenance/cargoRecreateData.php --table DemoPatronage
php extensions/Cargo/maintenance/cargoRecreateData.php --table DemoSuccessor
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Province
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Province}}
{{Saintapedia Graph examples}}
Archdiocese → diocese → parish (and a religious order / foundation). Same pattern as a real Places or Parishes table with a Page-type parent column.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type,Country
|parent_field=ParentOrg
|node_id=Name
|node_label=Name
|style_by=Type
|subgraph_by=Country
|direction=TD
|clickable=yes
}}
</pre>
On your wiki: <code>tables=Parishes</code> and <code>parent_field=Diocese</code> (or <code><nowiki>{{Org chart|table=Parishes|parent=Diocese|id=_pageName|style=Kind}}</nowiki></code>).
== Live ==
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type,Country
|parent_field=ParentOrg
|node_id=Name
|node_label=Name
|style_by=Type
|subgraph_by=Country
|direction=TD
|clickable=yes
}}
Click a node to open that demo page.
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/One diocese
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/One diocese}}
{{Saintapedia Graph examples}}
One diocese and the parishes that name it as parent. On a real wiki filter <code>where=Diocese="…"</code>.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type
|where=Name="Demo Diocese of Eastfield" OR ParentOrg="Demo Diocese of Eastfield"
|parent_field=ParentOrg
|node_id=Name
|style_by=Type
|direction=TD
|clickable=yes
}}
</pre>
== Live ==
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type
|where=Name="Demo Diocese of Eastfield" OR ParentOrg="Demo Diocese of Eastfield"
|parent_field=ParentOrg
|node_id=Name
|style_by=Type
|direction=TD
|clickable=yes
}}
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/By country
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/By country}}
{{Saintapedia Graph examples}}
Same hierarchy as [[Help:Saintapedia Graph/Province]], grouped into subgraphs by <code>Country</code> (United States vs Canada in the sample). A national conference of bishops can use <code>subgraph_by=Country</code> or <code>style_by=Rite</code> the same way.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type,Country
|parent_field=ParentOrg
|node_id=Name
|style_by=Type
|subgraph_by=Country
|direction=TD
|clickable=yes
}}
</pre>
== Live ==
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type,Country
|parent_field=ParentOrg
|node_id=Name
|style_by=Type
|subgraph_by=Country
|direction=TD
|clickable=yes
}}
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Funding
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Funding}}
{{Saintapedia Graph examples}}
Foundation / archdiocese / order → parish or diocese. Dual-table: colors and groups come from OrgDemo rows, arrows from GrantDemo.
== Wikitext ==
<pre>
{{#saintapedia_graph:
nodes_table=OrgDemo
|nodes_fields=_pageName,Name,Type,Country
|edges_table=GrantDemo
|edges_fields=Funder,Recipient,Amount
|edges_where=Year>=2023
|node_id=_pageName
|node_label=Name
|source_field=Funder
|target_field=Recipient
|edge_label=Amount
|style_by=Type
|subgraph_by=Country
|direction=LR
|theme=forest
|limit=300
}}
</pre>
Shorter: <code><nowiki>{{Funding network|nodes=OrgDemo|edges=GrantDemo|style=Type|subgraph=Country|edges_where=Year>=2023}}</nowiki></code>.
== Live ==
{{#saintapedia_graph:
nodes_table=OrgDemo
|nodes_fields=_pageName,Name,Type,Country
|edges_table=GrantDemo
|edges_fields=Funder,Recipient,Amount
|edges_where=Year>=2023
|node_id=_pageName
|node_label=Name
|source_field=Funder
|target_field=Recipient
|edge_label=Amount
|style_by=Type
|subgraph_by=Country
|direction=LR
|theme=forest
|limit=300
}}
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/One funder
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/One funder}}
{{Saintapedia Graph examples}}
One foundation's grants only. Edge mode: one Cargo table, no separate node query.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=GrantDemo
|fields=Funder,Recipient,Amount,Program
|where=Funder="Demo Catholic Community Foundation"
|source_field=Funder
|target_field=Recipient
|edge_label=Program
|direction=LR
|theme=forest
|clickable=yes
}}
</pre>
== Live ==
{{#saintapedia_graph:
tables=GrantDemo
|fields=Funder,Recipient,Amount,Program
|where=Funder="Demo Catholic Community Foundation"
|source_field=Funder
|target_field=Recipient
|edge_label=Program
|direction=LR
|theme=forest
|clickable=yes
}}
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Templates
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Templates}}
{{Saintapedia Graph examples}}
The imported wrappers [[Template:Org chart]] and [[Template:Funding network]]. Pass <code>table=</code> / <code>nodes=</code> / <code>edges=</code> so they do not assume an Organization table.
== Wikitext ==
<pre>
{{Org chart|table=OrgDemo|style=Type|subgraph=Country}}
{{Funding network|nodes=OrgDemo|edges=GrantDemo|style=Type|subgraph=Country|edges_where=Year>=2023}}
</pre>
== Live ==
=== Org chart ===
{{Org chart|table=OrgDemo|style=Type|subgraph=Country}}
=== Funding network ===
{{Funding network|nodes=OrgDemo|edges=GrantDemo|style=Type|subgraph=Country|edges_where=Year>=2023}}
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Raw source
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Raw source}}
{{Saintapedia Graph examples}}
<code>format=raw</code> prints Mermaid instead of drawing. Use this while matching column names.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type
|parent_field=ParentOrg
|node_id=Name
|format=raw
|limit=20
}}
</pre>
== Live ==
{{#saintapedia_graph:
tables=OrgDemo
|fields=_pageName=Name,ParentOrg,Type
|parent_field=ParentOrg
|node_id=Name
|format=raw
|limit=20
}}
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Deaneries
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Deaneries}}
{{Saintapedia Graph examples}}
Diocese → deanery → parish. Cargo template: [[Template:DemoPlace]] (table '''DemoPlace'''). [[Help:Saintapedia Graph/Create tables|Create the table]] first, then add pages that transclude <code><nowiki>{{DemoPlace|Kind=Deanery|…}}</nowiki></code>.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=DemoPlace
|fields=_pageName,ParentPlace,Kind
|where=Diocese="Diocese of Eastfield"
|parent_field=ParentPlace
|node_id=_pageName
|style_by=Kind
|direction=TD
|clickable=yes
}}
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Religious houses
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Religious houses}}
{{Saintapedia Graph examples}}
Congregation → province → house. Cargo template: [[Template:DemoHouse]] (table '''DemoHouse'''). [[Help:Saintapedia Graph/Create tables|Create the table]] first. The OrgDemo sample also includes one order row; see [[Help:Saintapedia Graph/Province]].
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=DemoHouse
|fields=_pageName,Province,Institute,Country
|parent_field=Province
|node_id=_pageName
|style_by=Institute
|subgraph_by=Country
|direction=LR
|theme=forest
|clickable=yes
}}
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Schools
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Schools}}
{{Saintapedia Graph examples}}
Catholic schools under a parish or diocese. Cargo template: [[Template:DemoSchool]] (table '''DemoSchool'''). [[Help:Saintapedia Graph/Create tables|Create the table]] first.
<code>Level</code> = Elementary / High school / University.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=DemoSchool
|fields=_pageName,Parish,Level,City
|where=Diocese="Diocese of Eastfield"
|parent_field=Parish
|node_id=_pageName
|style_by=Level
|direction=TD
|clickable=yes
}}
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Episcopal lineage
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Episcopal lineage}}
{{Saintapedia Graph examples}}
Each bishop row points at the consecrating bishop. Cargo template: [[Template:DemoBishop]] (table '''DemoBishop'''). [[Help:Saintapedia Graph/Create tables|Create the table]] first. Mutual consecrations are cycles — keep <code>warn_cycles=yes</code>.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=DemoBishop
|fields=_pageName,Consecrator,See
|parent_field=Consecrator
|node_id=_pageName
|style_by=See
|warn_cycles=yes
|break_cycles=no
|direction=TD
|limit=200
|clickable=yes
}}
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Twin parishes
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Twin parishes}}
{{Saintapedia Graph examples}}
Twin parishes or a merged cluster. Cargo template: [[Template:DemoParishLink]] (table '''DemoParishLink'''). [[Help:Saintapedia Graph/Create tables|Create the table]] first. One row per pair — edge mode, not a hierarchy.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=DemoParishLink
|fields=Parish,LinkedParish,Relation
|where=Relation="cluster" OR Relation="twin"
|source_field=Parish
|target_field=LinkedParish
|edge_label=Relation
|link_style=<-->
|direction=LR
|clickable=yes
}}
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Patron saints
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Patron saints}}
{{Saintapedia Graph examples}}
Patron saint → parish or place. Cargo template: [[Template:DemoPatronage]] (table '''DemoPatronage'''). [[Help:Saintapedia Graph/Create tables|Create the table]] first.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=DemoPatronage
|fields=Saint,Place,Feast
|source_field=Saint
|target_field=Place
|edge_label=Feast
|direction=LR
|theme=neutral
|clickable=yes
}}
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Help:Saintapedia Graph/Successors
12
SaintapediaGraph
0
wikitext
text/x-wiki
{{DISPLAYTITLE:Help:Saintapedia Graph/Successors}}
{{Saintapedia Graph examples}}
Suppressed diocese → successor see. Cargo template: [[Template:DemoSuccessor]] (table '''DemoSuccessor'''). [[Help:Saintapedia Graph/Create tables|Create the table]] first.
== Wikitext ==
<pre>
{{#saintapedia_graph:
tables=DemoSuccessor
|fields=_pageName,SucceededBy,Country
|source_field=_pageName
|target_field=SucceededBy
|direction=LR
|clickable=yes
}}
</pre>
[[Category:Help]]
[[Category:Saintapedia Graph]]
Saintapedia Graph demo
0
SaintapediaGraph
0
wikitext
text/x-wiki
#REDIRECT [[Help:Saintapedia Graph/Examples]]