Template:APIBreadcrumb/documentation: Difference between revisions
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
={{Font|Template Documentation|16|Calibri|bold|black}}= | ={{Font|Template Documentation|16|Calibri|bold|black}}= | ||
This | 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 | This template helps readers navigate the API product by inserting a single line of text that shows the API call's parent item(s) in the API object library. In this hierarchy, the API object library itself is the top-level item and is therefore level 0. Classes and enums are at level 1, and methods and properties, as well as sub classes, are at level 2, and so on. | ||
==Usage== | ==Usage== | ||
This template has four optional parameters. | This template has four optional parameters, each corresponding to the sub-levels. This means that parameter 1 is the level 1 item, parameter 2 is the level 2 item, and so on. | ||
<pre> | ===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 | The output of this code shows the level 0 parent item, as follows: | ||
= | <div style="background-color: #E6E6E6;"> | ||
{{Template:APIBreadcrumb}} | {{Template:APIBreadcrumb}} | ||
</div> | |||
===Example 2=== | ===Example 2=== | ||
The following code example shows the template | 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 reference doc of the call's parent item. | ||
<pre>{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}</pre> | <pre>{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}</pre> | ||
The output of this code | The output of this code shows the level 0 and level 1 parent items, separated by a period: | ||
<div style="background-color: #E6E6E6;"> | |||
{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}} | {{Template:APIBreadcrumb|.[[Repository Class|Repository]]}} | ||
</div> | |||
==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. This way, you have a way of finding all wiki pages related to a particular library. | |||
Revision as of 17:29, 5 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 product by inserting a single line of text that shows the API call's parent item(s) in the API object library. In this hierarchy, the API object library itself is the top-level item and is therefore level 0. Classes and enums are at level 1, and methods and properties, as well as sub classes, are at level 2, and so on.
Usage
This template has four optional parameters, each corresponding to the sub-levels. This means that parameter 1 is the level 1 item, parameter 2 is 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 reference doc of 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:
Member of: SynthesisAPI.Repository
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. This way, you have a way of finding all wiki pages related to a particular library.