Template:APIBreadcrumb/documentation: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:


={{Font|Template Documentation|16|Calibri|bold|black}}=
={{Font|Template Documentation|16|Calibri|bold|black}}=
Used for: Synthesis API documentation pages only
This template creates a breadcrumb link in the Synthesis [[API Reference Documentation]] pages. It is meant to resemble the navigation element found in VBA and VB.NET's Object Browser window.


This template helps readers navigate the API object library by inserting links to the parent items of an API call, thereby showing the call's place in the hierarchy. The API object library itself is the top-level item (level 0), classes and enums are level 1, methods and properties are level 2, etc.


This boilerplate template creates the breadcrumb found in the method and property pages. If you're looking for the breadcrumb link for API classes and enums, see Template:APIBreadcrumbClass.
==Usage==
This template has four optional parameters. The structure is as follows:
<pre>{{Template:APIBreadcrumb|.LINK1|.LINK2|.LINK3|.LINK4}}</pre>
 
where LINK1, LINK2, etc. are the parameters. You must add a period before each link.
 
Each parameter corresponds to a sub level in the hierarchy. This means that LINK1 is the link to the level 1 item, LINK2 is the link to the level 2 item, and so on.
 
===Example 1===
The following code example shows the breadcumb link for a level 1 call. Because the parent item is the API object library itself, the template omits all parameters.
<pre>{{Template:APIBreadcrumb}}</pre>
 
The output of this code shows the level 0 parent item, as follows:
 
<div style="background-color: #E6E6E6;">


This 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:
{{Template:APIBreadcrumb}}


: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.


</div>


<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.)     
===Example 2===
The following code example shows the breadcrumb link for a level 2 call. In this case, the template populates the first parameter by adding a link to the call's parent item.
<pre>{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}</pre>


==Usage==
The output of this code shows the level 0 and level 1 parent items, separated by a period:
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.
 
<div style="background-color: #E6E6E6;">
 
 
{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}


: 1 - Enter the API version in which the call <u>became</u> available.
: 2 - If the page is for a method or property, enter a link to the parent class.
: 3 - If the page is for a subclass, enter a link to the parent member.


</div>


For example, the following code will generate a template for a ''Version 10'' call that is associated with the ''Repository'' class. Notice the period ('''.''') before the link and how the code uses the pipe character (<nowiki> | </nowiki>) to change the way the link is displayed.
==Notes==
As of 2016, we have only one API object library; therefore, the link to the V9/V10 API Reference Documentation was hard coded into this template. If Development creates a second object library in the future, you might want to create a new breadcrumb template for that library. That way, you have a way of navigating items related to a particular library.


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


The output appears as follows:


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





Latest revision as of 15:27, 17 May 2016


Template Documentation

This template creates a breadcrumb link in the Synthesis API Reference Documentation pages. It is meant to resemble the navigation element found in VBA and VB.NET's Object Browser window.

This template helps readers navigate the API object library by inserting links to the parent items of an API call, thereby showing the call's place in the hierarchy. The API object library itself is the top-level item (level 0), classes and enums are level 1, methods and properties are level 2, etc.

Usage

This template has four optional parameters. The structure is as follows:

{{Template:APIBreadcrumb|.LINK1|.LINK2|.LINK3|.LINK4}}

where LINK1, LINK2, etc. are the parameters. You must add a period before each link.

Each parameter corresponds to a sub level in the hierarchy. This means that LINK1 is the link to the level 1 item, LINK2 is the link to the level 2 item, and so on.

Example 1

The following code example shows the breadcumb link for a level 1 call. Because the parent item is the API object library itself, the template omits all parameters.

{{Template:APIBreadcrumb}}

The output of this code shows the level 0 parent item, as follows:


Member of: SynthesisAPI


Example 2

The following code example shows the breadcrumb link for a level 2 call. In this case, the template populates the first parameter by adding a link to the call's parent item.

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

The output of this code shows the level 0 and level 1 parent items, separated by a period:

Notes

As of 2016, we have only one API object library; therefore, the link to the V9/V10 API Reference Documentation was hard coded into this template. If Development creates a second object library in the future, you might want to create a new breadcrumb template for that library. That way, you have a way of navigating items related to a particular library.