Template:Prayer: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 61: Line 61:
}}
}}


{| style="float:right; width:350px; background-color:#FFF8DC; border:1px solid #6B7280"
{{Infobox
|-
|title = {{{Name|{{PAGENAME}}}}}
| '''Stored in Cargo:''' {{#cargo_query:tables=Prayers|fields=Name|where=Name="{{{Name|{{PAGENAME}}}}}"|format=list}}
|above_style = background-color:#FFF8DC; font-size:120%; font-weight:bold;
|-
|headerstyle = background-color:#F5F5F5; font-weight:bold;
|}
|labelstyle = width:40%; vertical-align:top;
|datastyle = vertical-align:top;
|header1 = Prayer Information
|label2 = Author
|data2 = {{{Author|Unknown}}}
|label3 = Purpose
|data3 = {{{Purpose|}}}
|label4 = Recipient
|data4 = {{{Recipient|}}}
|label5 = Liturgical Context
|data5 = {{{LiturgicalContext|}}}
|label6 = Prayer Type
|data6 = {{{PrayerType|}}}
|label7 = Theme
|data7 = {{{Theme|}}}
|label8 = Feast Day
|data8 = {{{FeastDay|}}}
|label9 = Canonization Status
|data9 = {{{CanonizationStatus|N/A}}}
|label10 = Origin
|data10 = {{{Origin|}}}
|label11 = Use Context
|data11 = {{{UseContext|}}}
|label12 = Length
|data12 = {{{Length|}}}
|label13 = Season
|data13 = {{{Season|}}}
|label14 = Language
|data14 = {{{Language|English}}}
|label15 = Approval
|data15 = {{{Approval|None}}}
|label16 = Tags
|data16 = {{{Tags|}}}
|label17 = Added on
|data17 = {{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}}
}}
 
== {{{Name|{{PAGENAME}}}}} ==
== {{{Name|{{PAGENAME}}}}} ==
{{#if: {{{Text|}}} | '''Text:''' <blockquote>{{{Text}}}</blockquote> }}
{{#if: {{{Text|}}} | {{{Text}}} }}
{{#if: {{{Author|}}} | '''Author:''' {{{Author}}} }}
{{#if: {{{Purpose|}}} | '''Purpose:''' {{{Purpose}}} }}
{{#if: {{{Recipient|}}} | '''Recipient:''' {{{Recipient}}} }}
{{#if: {{{LiturgicalContext|}}} | '''Liturgical Context:''' {{{LiturgicalContext}}} }}
{{#if: {{{PrayerType|}}} | '''Prayer Type:''' {{{PrayerType}}} }}
{{#if: {{{Theme|}}} | '''Theme:''' {{{Theme}}} }}
{{#if: {{{FeastDay|}}} | '''Feast Day:''' {{{FeastDay}}} }}
{{#if: {{{CanonizationStatus|}}} | '''Canonization Status:''' {{{CanonizationStatus}}} }}
{{#if: {{{Origin|}}} | '''Origin:''' {{{Origin}}} }}
{{#if: {{{UseContext|}}} | '''Use Context:''' {{{UseContext}}} }}
{{#if: {{{Length|}}} | '''Length:''' {{{Length}}} }}
{{#if: {{{Season|}}} | '''Season:''' {{{Season}}} }}
{{#if: {{{Language|}}} | '''Language:''' {{{Language}}} }}
{{#if: {{{Approval|}}} | '''Approval:''' {{{Approval}}} }}
{{#if: {{{Tags|}}} | '''Tags:''' {{{Tags}}} }}
{{#if: {{{DateAdded|}}} | '''Added on:''' {{{DateAdded}}} }}


[[Category:Catholic Prayers]]
[[Category:Catholic Prayers]]
Line 89: Line 109:
<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.
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.


=== Parameters ===
=== Parameters ===
Line 135: Line 155:


=== 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%').
- If errors persist, check Cargo version (3.0+ recommended) and permissions in LocalSettings.php.
* - The prayer text is displayed below the infobox, without a blockquote, as plain text.
 
* - The infobox uses the `{{Infobox}}` template for a cleaner, standardized appearance.
* - If errors persist, check Cargo version (3.0+ recommended) and permissions in LocalSettings.php.
*
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>