Skip to content

wb template code transclude

Antonizoon 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

Android Development Codex

Note: All non-Android projects have moved to the BASLQC Wiki.

Introduction

  • Introduction - A quick intro to the rationale and ideals of this guide, and smartphone modding in general.
  • General Setup - Learn how to install and run the tools you need to succeed.
  • Device Guides - Customized, fully decked out guides for rooting each and every device we could find.
  • General OS Customizations - General customizations that work on all devices of a specific OS.

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.
  • Android Buying Guide for Modders - While modding can fix up an outdated device, it will make your life easier to buy the right device from the start.
Clone this wiki locally