Difference between revisions of "Examples of useful code"
m (Normal users do not have the edit links, they have the View Source tab instead.) |
|||
Line 2: | Line 2: | ||
− | + | Click on '''View Source''' tab, at the top, to see the code. | |
Revision as of 15:30, 21 August 2007
Contents
Click on View Source tab, at the top, to see the code.
Alphabetical Contents Lists
1. Each letter has its OWN page:
_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:
N.B. THIS USES THE SECTION HEADINGS SO IT APPEARS IN THE TOC/CONTENTS
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.
See below for using Clickpic for a contents with hyperlinked pictures.
Code with image for pages under construction
Displaying images
One single image
name | alignment | size | thumb or frame | caption
1. You can just put in the image
It will come out full size and aligned to the left with no border or caption.
[[image:name of image.jpg]]
2. You can choose horizontal alignment - right, left or center
[[image:name of image.jpg|alignment]]
3. You can choose the size
[[image:name of image.jpg||size]]
4. To get a frame round your picture
[[image:name of image.jpg|alignment|size|thumb]]
[[image:name of image.jpg|alignment|size|thumb|caption]]
Warning - combining more than one picture with or without text can give very unpredictable results.
As you will see from the examples on this page you often need to press enter several times in order to get a sensible page layout!!
More than one image on page
1. Gallery - small thumbnails
The Big_Book of Genealogy.
2. Clickpic - hyperlinked pictures
To make smaller clickpic images:
You have to make the image smaller in advance ... you can't just edit the existing code!!
Right click and select properties, copy the hyperlink.
http://www.familytreeforum.com/wiki/images/thumb/0/08/InitialsB.jpg/75px-InitialsB.jpg
You can Mix and Match sizes:
Images as hyperlinks outside the Wiki.
This example uses clickable pictures - this has the advantage of allowing you to use images to hyperlink to sites outside the Wiki. It uses the hyperlink of the image page. the image has to be uploaded in the size you need to use.
<span class="plainlinks"> link </span> stops the blue arrow on the side.
3. Picture on the left, some text and picture on the right
N.B. If the image has no "built in" border you need to use |thumb| not |frame|.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec in enim. Aliquam erat volutpat. Maecenas id nibh ut turpis lobortis commodo. Phasellus sed neque. Proin fringilla euismod libero. Etiam vel lectus. Aliquam dui. Curabitur venenatis molestie neque. Integer mi dolor, gravida at, accumsan eget, fringilla eget, arcu. Suspendisse euismod. Nam et lorem accumsan magna venenatis pellentesque. In et ante. Etiam magna. Cras rutrum mi quis tellus.
Sed mi eros, lacinia mattis, gravida vel, placerat posuere, lacus. Duis accumsan tincidunt sapien. Morbi sed velit. Etiam quis orci. Donec at velit sed lorem elementum feugiat. Curabitur ut ligula. Quisque in eros. Morbi sed enim id sapien tristique fringilla. Nunc ligula augue, pellentesque ac, nonummy id, semper eget, ante. Sed mi eros, lacinia mattis, gravida vel, placerat posuere, lacus. Duis accumsan tincidunt sapien. Morbi sed velit. Etiam quis orci. Donec at velit sed lorem elementum feugiat. Curabitur ut ligula. Quisque in eros. Morbi sed enim id sapien tristique fringilla. Nunc ligula augue, pellentesque ac, nonummy id, semper eget, ante.
Example of colour band for titles
ENGLISH COUNTIES |