Template:APIBreadcrumb/documentation: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '__NOTOC__<div style="background-color: #DBE9F4;"> ={{Font|Template Documentation|16|Calibri|bold|black}}= Used for: Synthesis API documentation pages only This boilerplate t…')
 
No edit summary
Line 6: Line 6:




This boilerplate template creates the breadcrumb link in the documentation pages of the API methods and properties. If you're looking for the breadcrumb link for API classes, see [[Template:APIBreadcrumbClass]].
This boilerplate template is for the breadcrumb link in the API reference pages. It resembles the navigation element found in VBA and VB.NET's Object Browser window, and it serves as our main method for navigating the API product.  


The breadcrumb link resembles the navigation element found in VBA and VB.NET's Object Browser window, and it serves as our main method for navigating the API product.
The breadcrumb contains the following information:
 
:a) The API version in which the call became available.
:b) The name of the object library.*
:c) The name of the parent object and/or member, if applicable.
 
 
<nowiki>*</nowiki> Note that the name and link to the V9/V10 [[Full Synthesis API|SynthesisAPI]] object library is hard coded into this template. If Development creates a new object library in the future, please create a new breadcrumb template for that library. This way, you have a method for finding all wiki pages related to a particular library. (As of July 2015, we've decided to stop using admin categories to find related pages. Templates, along with the "What links here" utility, are now used for that purpose.)     


==Usage==
==Usage==
This template requires two parameters:
The template has one required parameter and two optional ones, depending on the what is being documented. If documenting a class or enumeration, only parameter #1 is required, the rest can be left blank.


: 1 - Indicate the API version.
: 1 - Enter the API version in which the call became available.
: 2 - Add the name of the parent class. This parameter automatically creates a link to the parent class's page. This automated process will work as long as the name of the page has the following format: <code>NAME_Class</code>. Examples are [[Repository Class]] or [[cModel Class]]. (Note how "Class" is uppercase.)
: 2 - If documenting methods and properties, enter a link to the parent class or enumeration.  
: 3 - If documenting a subclass, enter a link to the parent member.  




For example, the following code will generate a template for a ''Version 10.x.5'' method that is associated with the ''Repository'' class.  
For example, the following code will generate a template for a ''Version 10'' call that is associated with the ''Repository'' class. Notice how the code uses the pipe character (<nowiki>|</nowiki>) to change the way the link to the parent class is displayed.


<pre> {{Template:APIBreadcrumb|10.x.5|Repository}} </pre>
<pre> {{Template:APIBreadcrumb|10|[[Repository Class|Repository]]}} </pre>


The output appears as follows:
The output appears as follows:


{{Template:APIBreadcrumb|10.x.5|Repository}}
{{Template:APIBreadcrumb|10|[[Repository Class|Repository]]}}





Revision as of 18:09, 17 July 2015


Template Documentation

Used for: Synthesis API documentation pages only


This boilerplate template is for the breadcrumb link in the API reference pages. It resembles the navigation element found in VBA and VB.NET's Object Browser window, and it serves as our main method for navigating the API product.

The breadcrumb contains the following information:

a) The API version in which the call became available.
b) The name of the object library.*
c) The name of the parent object and/or member, if applicable.


* Note that the name and link to the V9/V10 SynthesisAPI object library is hard coded into this template. If Development creates a new object library in the future, please create a new breadcrumb template for that library. This way, you have a method for finding all wiki pages related to a particular library. (As of July 2015, we've decided to stop using admin categories to find related pages. Templates, along with the "What links here" utility, are now used for that purpose.)

Usage

The template has one required parameter and two optional ones, depending on the what is being documented. If documenting a class or enumeration, only parameter #1 is required, the rest can be left blank.

1 - Enter the API version in which the call became available.
2 - If documenting methods and properties, enter a link to the parent class or enumeration.
3 - If documenting a subclass, enter a link to the parent member.


For example, the following code will generate a template for a Version 10 call that is associated with the Repository class. Notice how the code uses the pipe character (|) to change the way the link to the parent class is displayed.

 {{Template:APIBreadcrumb|10|[[Repository Class|Repository]]}} 

The output appears as follows:

Member of: SynthesisAPI10Repository