Template:APIBreadcrumb/documentation: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 3: Line 3:


={{Font|Template Documentation|16|Calibri|bold|black}}=
={{Font|Template Documentation|16|Calibri|bold|black}}=
Used for: Synthesis API reference documentation pages only
This boilerplate template is for use with the Synthesis API reference documentation pages only. It allows you to create a breadcrumb link that helps users navigate the API product.


As of July 2015, we've decided to stop using MediaWiki categories to organize the pages on the wiki. This means that the content on the ReliaWiki site has no real structure. This is problematic for the API reference documentation, which requires some structure in order for the content to make sense.


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.  
This template attempts to provide that structure by inserting a single line of text that shows the method's or class's location in the API object library. Its meant to resemble the navigation element found in VBA and VB.NET's Object Browser window.


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.  
==Usage==
This template has four optional parameters. The first parameter represents the level 1 item, the second parameter represents the level 2 item, and so on. The structure is as follows (note how the breadcrumb uses periods to delimit each item):
 
<pre>LibraryName.Level1.Level2.Level3.Level4</pre>
 
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. 
 
===Example 1===
The following code example shows the template without using any of the parameters.
<pre>{{Template:APIBreadcrumb}}</pre>


The breadcrumb contains the following information:
The output of this code is as follows:


:a) The API version in which the call became available.
{{Template:APIBreadcrumb}}
: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.)     
===Example 2===
The following code example shows the template with one parameter in use.
<pre>{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}</pre>


==Usage==
The output of this code is as follows:
The template has one required parameter and two optional ones, depending on what is being documented.  
 
{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}


: 1 - Enter the API version in which the call was <u>first</u> introduced. (Required)
: 2 - If the page is for a method or property, enter a link to the parent class. Otherwise, leave it blank.
: 3 - If the page is for a subclass, enter a link to the parent member. Otherwise, leave it blank.




For example, the following code will generate a template for a call that was created in ''API Version 10'' and 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.


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


The output appears as follows:


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





Revision as of 23:23, 13 November 2015


Template Documentation

This boilerplate template is for use with the Synthesis API reference documentation pages only. It allows you to create a breadcrumb link that helps users navigate the API product.

As of July 2015, we've decided to stop using MediaWiki categories to organize the pages on the wiki. This means that the content on the ReliaWiki site has no real structure. This is problematic for the API reference documentation, which requires some structure in order for the content to make sense.

This template attempts to provide that structure by inserting a single line of text that shows the method's or class's location in the API object library. Its meant to resemble the navigation element found in VBA and VB.NET's Object Browser window.

Usage

This template has four optional parameters. The first parameter represents the level 1 item, the second parameter represents the level 2 item, and so on. The structure is as follows (note how the breadcrumb uses periods to delimit each item):

LibraryName.Level1.Level2.Level3.Level4

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.

Example 1

The following code example shows the template without using any of the parameters.

{{Template:APIBreadcrumb}}

The output of this code is as follows:

Member of: SynthesisAPI


Example 2

The following code example shows the template with one parameter in use.

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

The output of this code is as follows:

Member of: SynthesisAPI.Repository