Difference between revisions of "Examples of useful code"

From the Family Tree Forum Reference Library
m
m
Line 4: Line 4:
 
__TOC__
 
__TOC__
  
THE CONTENT ON THIS PAGE IS BEING MOVED TO OTHER PAGES===
 
  
 +
==Alphabetical Contents Lists==
 +
 +
See [[Adding Content to The Wiki ~ Images and Tables 2]] for using hyperlinked pictures.
  
==Alphabetical Contents Lists==
 
  
====1. Each letter has its OWN page:====
+
====1. Each letter has its OWN page====
 +
 
 +
When you click on the letter, you will be taken to the selected page.
 +
 
 +
To see the code at work:  [[Surname Directory]].
 +
 
  
 
[[_A ]]|[[_B ]]|[[_C ]]|[[_D ]]|[[_E ]]|[[_F ]]|[[_G ]]|[[_H ]]|[[_I ]]|[[_J ]]|[[_K ]]|[[_L ]]|[[_M ]]|[[_N ]]|[[_O ]]|[[_P ]]|[[_Q ]]|[[_R ]]|[[_S ]]|[[_T ]]|[[_U ]]|[[_V ]]|[[_W ]]|[[_XYZ]]
 
[[_A ]]|[[_B ]]|[[_C ]]|[[_D ]]|[[_E ]]|[[_F ]]|[[_G ]]|[[_H ]]|[[_I ]]|[[_J ]]|[[_K ]]|[[_L ]]|[[_M ]]|[[_N ]]|[[_O ]]|[[_P ]]|[[_Q ]]|[[_R ]]|[[_S ]]|[[_T ]]|[[_U ]]|[[_V ]]|[[_W ]]|[[_XYZ]]
Line 15: Line 21:
  
  
====2. Links WITHIN the same page:====
+
====2. Links WITHIN the same page====
 +
 
 +
When you click on the letter, you will be taken to the selected page.
 +
 
 +
To see the code at work:  [[Surname Directory]].
  
  
Line 51: Line 61:
  
  
See [[Surname Directory]] for an example of how this code works.
+
==Redirections==
 +
A redirect allows one page to divert to another with the minimum amount of fuss.  
  
 +
Redirects are usually used when information has been moved to another location.
  
See [[Adding Content to The Wiki ~ Images and Tables 2]] for using hyperlinked pictures.
+
====To make a redirect====
  
 +
*Create a new page
  
----
+
*Then type: <nowiki>#REDIRECT [[pagename]]</nowiki> (Page name being the name of the page you are linking to.
 +
*If you then search for the page you just created as a redirect, you'll be transferred to the page you linked the redirect to.
  
  
Line 65: Line 79:
 
| style="color:white" bgcolor="LightSteelBlue "|'''ENGLISH COUNTIES'''
 
| style="color:white" bgcolor="LightSteelBlue "|'''ENGLISH COUNTIES'''
 
|}
 
|}
 +
 +
 +
====Colour Chart====
 +
 +
*[http://www.w3schools.com/html/html_colornames.asp HTML Colour names]
  
  

Revision as of 05:24, 5 April 2008

Page being edited by Caroline


Alphabetical Contents Lists

See Adding Content to The Wiki ~ Images and Tables 2 for using hyperlinked pictures.


1. Each letter has its OWN page

When you click on the letter, you will be taken to the selected page.

To see the code at work: Surname Directory.


_A |_B |_C |_D |_E |_F |_G |_H |_I |_J |_K |_L |_M |_N |_O |_P |_Q |_R |_S |_T |_U |_V |_W |_XYZ


2. Links WITHIN the same page

When you click on the letter, you will be taken to the selected page.

To see the code at work: Surname Directory.


N.B. THIS USES THE SECTION HEADINGS SO THAT IT APPEARS IN THE TOC/CONTENTS


A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | XYZ


Example of the code: [[#A|A]]


#A is the name of the section. By putting |after it you can call the link anything you like.


If there is nothing else on the page you can use ____NOTOC__ .


This avoids a long vertical list in the contents.


N.B. If you do use __NOTOC__ anywhere on the page this overules the __TOC__.


If you can't use __NOTOC__ on a page because it already uses __TOC__ you can do the following:


'''A'''<span id="A"></span> This creates the anchor for the letter A


'''B'''<span id="B"></span> This creates the anchor for the letter B


Then you can use the code [[#A|A]] as above.


Redirections

A redirect allows one page to divert to another with the minimum amount of fuss.

Redirects are usually used when information has been moved to another location.

To make a redirect

  • Create a new page
  • Then type: #REDIRECT [[pagename]] (Page name being the name of the page you are linking to.
  • If you then search for the page you just created as a redirect, you'll be transferred to the page you linked the redirect to.


Example of colour band for titles

ENGLISH COUNTIES


Colour Chart


Help Pages for The Wiki

Adding content


Visual Reference