Template:Prayer: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
{{#template_params:Name
{{#template_params:Name
|Text
|Author (default=Unknown)
|Author (default=Unknown)
|Purpose (placeholder=Adoration,Petition,Thanksgiving,Repentance,Intercession,Consecration)
|Purpose (placeholder=Adoration,Petition,Thanksgiving,Repentance,Intercession,Consecration)
Line 20: Line 19:
{{#cargo_declare:_table=Prayers
{{#cargo_declare:_table=Prayers
|Name=String (INDEX)
|Name=String (INDEX)
|Text=Text
|Author=String (INDEX)
|Author=String (INDEX)
|Purpose=Text
|Purpose=Text
Line 42: Line 40:
{{#cargo_store:_table=Prayers
{{#cargo_store:_table=Prayers
|Name={{{Name|{{PAGENAME}}}}}
|Name={{{Name|{{PAGENAME}}}}}
|Text={{{Text|}}}
|Author={{{Author|}}}
|Author={{{Author|}}}
|Purpose={{{Purpose|}}}
|Purpose={{{Purpose|}}}
Line 101: Line 98:
|data17 = {{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}}
|data17 = {{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}}
}}
}}
== {{{Name|{{PAGENAME}}}}} ==
{{#if: {{{Text|}}} | {{{Text}}} }}


[[Category:Catholic Prayers]]
[[Category:Catholic Prayers]]
Line 109: Line 103:
<noinclude>
<noinclude>
== Usage ==
== Usage ==
This template defines the Cargo table `Prayers` and stores/displays information about Catholic prayers. It is typically used via the [[Form:Prayer]] form or directly on prayer pages. The table is defined when the template is first saved, and subsequent uses store data. The prayer text is displayed outside the infobox, while other parameters are shown in a structured infobox.
This template defines the Cargo table `Prayers` and stores/displays metadata about Catholic prayers in an infobox. It is typically used via the [[Form:Prayer]] form or directly on prayer pages. The table is defined when the template is first saved, and subsequent uses store data. Only the infobox is displayed, with no section heading or prayer text.


=== Parameters ===
=== Parameters ===
* '''Name''': The title of the prayer (defaults to page name).
* '''Name''': The title of the prayer (defaults to page name).
* '''Text''': The full text of the prayer.
* '''Author''': The composer (e.g., "St. Francis of Assisi", "Unknown").
* '''Author''': The composer (e.g., "St. Francis of Assisi", "Unknown").
* '''Purpose''': The intention (e.g., Adoration, Petition, or comma-separated like Adoration,Petition).
* '''Purpose''': The intention (e.g., Adoration, Petition, or comma-separated like Adoration,Petition).
Line 135: Line 128:
{{Prayer
{{Prayer
|Name=Memorare
|Name=Memorare
|Text=Remember, O most gracious Virgin Mary, that never was it known...
|Author=St. Bernard of Clairvaux
|Author=St. Bernard of Clairvaux
|Purpose=Petition
|Purpose=Petition
Line 155: Line 147:


=== Notes ===
=== Notes ===
* The Cargo table `Prayers` is defined when this template is saved. If the table doesn’t appear in Special:CargoTables, use Special:CreateCargoTable with the #cargo_declare code or transclude on a setup page (e.g., PrayersSetup).
* - The Cargo table `Prayers` is defined when this template is saved. If the table doesn’t appear in Special:CargoTables, use Special:CreateCargoTable with the #cargo_declare code or transclude on a setup page (e.g., PrayersSetup).
* Use [[Form:Prayer]] for easy data entry.
* - Use [[Form:Prayer]] for easy data entry.
* Query the table using {{#cargo_query:tables=Prayers}} with LIKE for Text fields (e.g., where=Purpose LIKE '%Petition%').
* - Query the table using {{#cargo_query:tables=Prayers}} with LIKE for Text fields (e.g., where=Purpose LIKE '%Petition%').
* The prayer text is displayed below the infobox, without a blockquote, as plain text.
* - The template displays only an infobox with metadata, without a section heading or prayer text.
* The infobox uses the `{{Infobox}}` template for a cleaner, standardized appearance.
* - The infobox uses the `{{Infobox}}` template for a standardized appearance.
* If errors persist, check Cargo version (3.0+ recommended) and permissions in LocalSettings.php.
* - If errors persist, check Cargo version (3.0+ recommended) and permissions in LocalSettings.php.
*
 
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Navigation menu