v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:FJH/fjh tabbed"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (Revoked blockquote sections and cast them as quote box sections as per templating.)
m (Blanked the page)
Line 1: Line 1:
<!-- USER FJH TABS TAB -->
 
{{User:FJH/tabs|This=8}}
 
  
== How to Use the PageTab Template ==
 
 
It probably goes without saying, but templates make this wiki much better than it could ever be on its own.  They employ advanced and, typically, standardized methods of information presentation and purport aesthetic elegance; but, they are not all intuitive in and of themselves.  Some require basic knowledge of how other other templates work to understand how these higher-order templates work; and, some require precise formatting just to accommodate basic display.  [[Template:PageTabs|PageTabs]] is something like that, whose difficulty is compounded by the template's main definition page itself lacking a set of instructions, and a severe lack of demonstrated examples.  As far as I know, the only user and only page that has employed this organized template before myself belongs to [[User:Vaevictus|Vaevictus]], and it is from his user page by which I understand anything about how this template works.
 
 
 
The essential idea behind [[Template:PageTabs|PageTabs]] is that a variety of related pages can be displayed from a single page, with each one having a visible bookmark lined-up above the current page as a section header.  It is just like "tabbed browsing" only that the pages that you can "switch tabs" between are mostly fixed.  At the moment, there is no meta-formatting template that allows for different tab design.  The actual operation of tabbed wiki-ing gives the impression of using frames.
 
 
 
From the page you wish to include in tabs - we shall call that page ''WIKIPAGE'' - you first should create a page called ''WIKIPAGE/tabs''.  Create ''WIKIPAGE/tabs'' and in this page include something along the following lines.
 
<p>
 
<div style="width: 14em; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ccc; background: #eee; text-align: left">
 
<font size=-2>
 
{{PageTabs <br />
 
&nbsp;&nbsp;|<nowiki>[[WIKIPAGE|LABEL1]]</nowiki><br />
 
&nbsp;&nbsp;|<nowiki>[[WIKIPAGE/PAGE2|LABEL2]]</nowiki><br />
 
&nbsp;&nbsp;|<nowiki>[[WIKIPAGE/tabs|LABEL3]]</nowiki><br />
 
&nbsp;&nbsp;|<nowiki>This={{{This|#}}}</nowiki><br />
 
}}<br />
 
</font>
 
</div>
 
</p>
 
This example creates a header with three tabs on it.  The first tab links to the main ''WIKIPAGE'' on which the tab system shall appear and its tab uses the text LABEL1; subsequent tabs link to respectively subsequent pages and use respectively subsequent labels.  Note that each tab is set up to look as if one is typing an external hyperlink!  Also note that I have included the last tab as a link to the ''WIKIPAGE/tab'' page that contains the definition tag for the rest of this page's tab system.  The purpose of this link is for easy access at a later date, to add or remove tabs from the header.  This is not necessary, at the end or anywhere, but will be helpful.  The specific newline format of the PageTab tag demonstrated here is also not absolutely necessary; it is used for emphasis.
 
 
 
The ''This'' line assigns what tab will be indicated on this page, which part of the tab menu will be highlighted when you click on that tab.  Assume ''#'' is a number where the range is 1 to the maximum number of tabs used.  Messing up this line by including a number that refers to the wrong tab or to a tab which does not exist will not mess up navigation, just display, at least right now.  If you are connecting to ''WIKIPAGE/tabs'', the number MUST represent the correct tab.  Use copious amounts of ''Show Preview'' until it looks pleasing before the final ''Save Page''.
 
 
 
Now navigate to ''WIKIPAGE'' and, considering other formatting on the page, edit the page and, somewhere on it, include the tag:
 
<p>
 
<div style="width: 12em; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ccc; background: #eee; text-align: left">
 
<font size=-2>
 
{{<nowiki>WIKIPAGE/tabs</nowiki>|This=1}}
 
</font>
 
</div>
 
</p>
 
Including this line will display the tab header on this page and identify it as the main page for the tab system.  When you first see the menu, you will noticed that the text on all tabs excluding the first one (the one you are on) will be displayed like they are broken links.  To create and indoctrinate these pages into the system of tabbed browsing, click on the tab to navigate to the nonexistent tab's page and edit it to include the above text, with the appropriate incremented number in the ''This='' line.
 
<p>
 
<div style="width: 12em; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ccc; background: #eee; text-align: left">
 
<font size=-2>
 
{{<nowiki>WIKIPAGE/tabs</nowiki>|This=2}}
 
</font>
 
</div>
 
<div style="width: 12em; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ccc; background: #eee; text-align: left">
 
<font size=-2>
 
{{<nowiki>WIKIPAGE/tabs</nowiki>|This=3}}
 
</font>
 
</div>
 
</p>
 
As opposed to the main definition tag, this number has to be correct, else the wrong tab could be displayed.  When you preview the page now, it should include the tab menu you defined on ''WIKIPAGE/tabs''.  If you are using my advice and include a tab to ''WIKIPAGE/tabs'', you will still need to correct its ''This|#'' number before it appears in the menu.
 
 
 
When no tabs show as broken links and all tabs display a unique body of text under the same tabbed header, you are done.
 
 
 
* [[Template]]
 
* [[Template:PageTabs|Template:PageTabs]]
 
* [[Template:Quote_Box|Template:Quote_Box]]
 

Revision as of 21:07, 8 May 2009