Skip to content

wb template code transclude

Lawrence edited this page Jan 15, 2013 · 1 revision
< style="text-align:; background-color:;">   [] >

Table of Contents

Documentation

This template is designed to act as a "box" in the style of separate information boxes as seen in textbooks (often labelled Box 1.1, etc.). It is assumed that the content of the box is saved on a separate page. The name of the page is passed to this template and it is automatically transcluded as the contents of the box. When writing a book, this separates the contents of each information box from the main text: usually a desirable feature.

Titles

A minimal use of the template can be seen by providing a single unnamed argument, which is interpreted as the path to the page to be transcluded into the box. This can be useful for title-less boxed, or if you want to have the title of the box in the transcluded file itself. However, this means that you cannot take advantage of the collapsible box mechanism, detailed below. If two unnamed arguments are provided, the first argument is treated as the box title, and the second as the path to the page to be transcluded.

Collapsible boxes

You can use the "collapsible" parameter to turn long boxes, which may distract a reader from the main text, into drop-down boxes. Use "collapsible=hidden" to have the contents hidden by default. This cannot be used on title-less boxes (there has to be a titlebar to contain the drop-arrow when the box is hidden).

Extra functionality

To provide a link to allow editing of the transcluded page, a self-styled "edit" link is provided. This uses #rel2abs, so assumes that the link is a relative one (as is likely to be the case in a book with text boxes collected in one place. This is, however, a slight hack. Improvements are welcome! The "head" of the box (i.e. the title) can be tweaked using the headType parameter, which can (if required) be set to the header levels h2, h3, h4, etc. This means that the box will appear in the TOC listing for the page. The headAlign parameter allows the head to be shifted to the right or left, as opposed the the default centred title. The box can be further adjuested by using the "color, "float" and "width" and parameters. Examples are provided below, mostly using the "Lorem" template

Examples

One argument (a simple box)
{{Code:Transclude|Lorem}}
Two arguments (a box with a title)
{{Code:Transclude|Box 1.2|Lorem}}
A collapsible box
{{Code:Transclude|Box 1.3|Lorem|collapsible= collapsible}}
A collapsible box, hidden by default, with a left-aligned title of heading level 4
{{Code:Transclude|Box 1.4|Lorem|collapsible=hidden|headType=h4|headAlign=left}}
The most complicated (and most realistic) A collapsible box at the side, in a different colour
{{Code:Transclude|Box 1.5|Lorem
|collapsible=true
|color=#778899
|float=right
|width=25%
|headType=h5}}
Transclude
BA Logo

Bibliotheca Anonoma

BASLQC Wiki

  • Introduction - A quick intro to the rationale and ideals of this guide, and modding in general.
  • Essential Maker Skills - Essential Skills that every maker should have.
  • Archivist Tools - All the tools an internet archivist needs under their belt.

General Guides

  • Android Development Codex - All kinds of Android smartphones.
  • Business Class Laptops - Computers that last: The ThinkPad, the HP EliteBook, the Dell Precision/Latitude.
  • EBook Readers - A good eInk screen remains the best way to read literature comfortably.
  • Game Consoles - Homebrew development scenes have made it possible to unlock the full power of your game console's computer chip.
  • Graphing Calculators - This is the last vestige of the age of 80's Home Computers; where programs were simple and graphics were minimal.
  • Home Server - Why buy cloud storage when you can build your own cloud? For media streaming, torrenting, and VPN access (to bypass blocked internet).
  • Routers - Amazingly, your ordinary router probably runs Linux on it's little embedded CPU.
  • Authentication Wallets - Manage your plethora of accounts, passwords, and RSA public keys using a GPG-encrypted wallet.
  • LEGO Mindstorms - The easiest way to build functional robots and machines; using good ol' LEGO and Technic bricks.
  • Vintage Computers - Amiga, Apple ][, and all the other random home computers that defined the 1980s.

Research

  • Genetic Programming - Programs that mutate and evolve by themselves, like Genes. It's a very difficult concept to grasp, but a very powerful method that transcends math or algorithms.

Content Guidelines

  • General Guidelines - The ideals that you should uphold while working with and editing this guide.
  • Device Guide Templates - Templates and general guidelines for creating customized guides for a device.
  • Linux - Run a full desktop OS on your little mobile device; research is being made to make it comfortable to use in the mobile space.

Reference

  • Glossary - Contains all the crazy acronyms and word soup that you'll need to wade through when using this guide.
Clone this wiki locally