Template:CCC/doc

Designed to quickly and consistently cite paragraphs from the text Catechism of the Catholic Church, using subset of "cite:web" format. Must be enclosed between reference tags or in a reference template. This Template was updated in July 2021 to reflect revisions to the Vatican website.

 

 

Uses a table to automatically link to the specified paragraph. Can be used to set a simple range of paragraphs. When an invalid paragraph number is selected, the template returns the table of contents for the catechism.

This template defaultly provides an abbreviated citation (CCC) when used, however the long form (Catechism of the Catholic Church) may optionally be set. Manually inputted dates defaultly rendered in "dmy" format.


 * Note: While generally reliable, there is some variation at the beginning/end of chapters or sections based on which online version of the catechism is used where cited paragraphs may appear on different webpages. This may be worked around by using the  or  parameters manually.  If necessary, the entire url can be set using .


 * Optionally,   may be used to generate a complete citation.  CCC2, however, is only compatible with the "basic parameters" listed below.


 * Basic parameters


 * - input paragraph number, or first paragraph in a range. Can also use first unnamed parameter  as paragraph number.


 * - optional end of a range of paragraphs. Does not influence output page selection.


 * - specify the date the catechism website was accessed. Can also be set using the second unnamed parameter  (only if first unnamed  is used to set paragraph number).  Manually input dates will be rendered in "dmy" unless the  parameter is used. -- Note:  has been deprecated for compatibility with other citation templates


 * - optional note/quote added to end. Could be used quote portions of text.


 * Intermediate parameters


 * - use "long=on" to display a complete citation, rather than an abbreviated footnote. For use in articles where only a few citations from the CCC are used. Displays the full paragraph number/range, catechism title (Catechism of the Catholic Church, Second Edition), the publisher (Libreria Editrice Vaticana), and publication date (2012).


 * - use to cite a custom range. For instance, "CCC, 99-100,103" (bolded portion pp_range text.).  Could also be used to give a chapter or section tile in lieu of bare paragraph number. A "pp" parameter or first parameter, must be specified to generate link to the catechism text.


 * or - fully customize what text is displayed for the reference link.  Use when leading "CCC" or "Paragraph(s)" is to be omitted or further customized.  A "pp" parameter or first parameter, must be specified to generate link to the catechism text.


 * - manually set the access date format; options include "dmy (default)", "mdy", etc. (See template:date for details)


 * Advanced parameters


 * - specify an alternative publisher source (default for short form is:"Vatican.va", long form is:"Libreria Editrice Vaticana")


 * - in the long form, specify an alternative work title (default is "Catechism of the Catholic Church, Second Edition")


 * - in the long formspecify the publication date if an alternative publisher is used. (Default is 2012 based on Second Edition)


 * - online catechism source url, less a filename. Set this to link to a different online catechism text. (Default is "https://www.vatican.va/archive/ENG0015/__P").  Useful for linking to foreign language editions (ie, "https://www.vatican.va/archive/FRA0013" for the French edition). You must include the "http://", "https://", or other protocol indicator in the url.


 * - output from the Template:CCC/TOC lookup, which links the Catechism paragraph number to the corresponding webpage. Can also manually set to specify a base page name (between prefix or suffix).  Could be used to manually select the part, section and chapter, but must be manually formatted.


 * - added to beginning of base_page; default is "__P". Note that "__P" is the start of the individual page name; Template:CCC/TOC lookup provides the remainder of the page name.


 * - added to end of base_page to complete the filename on the webpage (default is ".HTM")


 * - manually set entire filename (no prefix/suffix added). Default is the output from TOC lookup selection


 * or - manually specify the entire reference url (base and file). You must include the "http://", "https://", or other protocol indicator in the url.


 * Table of contents look up table:


 * Template:CCC/TOC lookup - contains the table of contents and a "#switch" parser function to link paragraph number to catechism webpage, based on the part section chapter that the paragraph falls in. This subpage may be updated independent of the code here, or an alternative maybe chosen by passing a template to "base_page".


 * When an invalid paragraph number is selected, the template returns the table of contents for the catechism.

Usage

 * Examples:


 * Basic


 * Range:


 * Date accessed/retrieved


 * Optional quote at end


 * Long format






 * Specify group*


 * *Group used but hidden in all examples here to better illustrate the specific example parameter.


 * Alternative publisher

Under the hood
This template uses an imbedded template called Template:CCC/TOC lookup, which stores the look up table containing the key linking the CCC paragraph number to its page on the Vatican or Saint Charles Borromeo website.

TemplateData
{	"params": { "pp": { "aliases": [ "1"			],			"label": "pp", "description": "Input paragraph number, or first paragraph in a range", "type": "number", "required": true },		"end": { "description": "Optional end of a range of paragraphs. Does not influence output page selection" },		"accessdate": { "aliases": [ "2"			],			"description": "Date source was accessed", "type": "date" },		"quote": { "description": "Quote short passage from source", "type": "unknown" },		"long": { "description": "Use \"long=on\" to display a complete citation, rather than an abbreviated footnote." },		"pp_range": { "description": "Use to cite a custom range. For instance, \"CCC, 99-100,103\"" },		"display": { "aliases": [ "title" ],			"description": "Fully customize what text is displayed for the reference link." },		"format": { "description": "Specify date output format" }	},	"description": "Create citation for Catechism of the Catholic Church", "paramOrder": [ "pp", "end", "accessdate", "quote", "long", "pp_range", "display", "format" ],	"format": "inline" }