Template:Fund sidebar/doc

< Template:Fund sidebar
Revision as of 20:31, 15 March 2015 by LadyGeek (talk | contribs) (Additional technical details.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The purpose of this template is to add a sidebar to pages that are about a fund. The sidebar contains navigation links about the fund.


  • Fund (required) - the name of the fund. If a main page exists for the fund, use the page title.
  • HeaderTitle (required) - A short description to appear as the sidebar header title.
  • FundNumber (optional) - the Vanguard fund number, used to build the Vanguard website URL
  • TrackingError (optional) - Tracking error pages are not individual "fund" pages, but rather asset class pages. If one exists, insert the title of the tracking error page.

Many pages for Vanguard funds also have two additional pages:

  • A page for expenses
  • A page for tax distributions

If the value passed to the fund parameter has a page for any of these, then a link to these pages will be added to the menu.


The wiki page "Vanguard Small Cap Index Fund" does not exist, so the HeaderTitle text "Small Cap Index Fund" is used in place of a link.

{{Fund sidebar
| fund = Vanguard Small Cap Index Fund
| HeaderTitle = Small Cap Index Fund
| TrackingError = Vanguard small cap index funds tracking error
| FundNumber = 0048

Will output:

Technical notes

The Vanguard URL is created by passing the FundNumber to {{VanguardFundURL}} as the first numbered parameter.

In the above example, FundNumber 0048 will pass as:

  1. {{VanguardFundURL|1={{{FundNumber|0048}}}}}, translating to:
  2. {{VanguardFundURL|1=0048}}, which results in
  3. [https://personal.vanguard.com/us/funds/snapshot?FundId=0048&FundIntExt=INT Website]
  4. and be displayed as: Website

On readability, the parser functions used to create the page links are intentionally put on a single line (#if statements run together). Otherwise, missing links will appear as an extra blank line.

Further reading