This is an archive copy of wikilivres.ca as of 18 February 2017 (from the WikiTeam dump). The original site is closed.
Help:Preloaded templates: Difference between revisions
imported>Yann |
imported>Yann |
||
| Line 2: | Line 2: | ||
== How does it work? == | == How does it work? == | ||
1. | 1. In your preferences, click on Gadgets tab, and then on the "Preload useful templates such as header and textinfo" option. | ||
2. Create a table of contents like this: | 2. Fill in the <nowiki>{{</nowiki>[[Template:Title|title]]<nowiki>}}</nowiki> template with title, author, translator, language if not English, notes. | ||
3. Create a table of contents like this: | |||
<pre> | <pre> | ||
| Line 13: | Line 15: | ||
</pre> | </pre> | ||
4. Click on a red link in the table of contents: you have a page with a preloaded <nowiki>{{</nowiki>[[Template:Header|header]]<nowiki>}}</nowiki> template! | |||
If you modify the table of contents, you have to empty the cache of your navigator, and to reload the page. | If you modify the table of contents, you have to empty the cache of your navigator, and to reload the page. | ||
[[Category:Wikilivres|Preloaded templates]] | [[Category:Wikilivres|Preloaded templates]] | ||
Revision as of 15:15, 22 July 2008
With the gadget extension and some Javascript, headers can be preloaded when we open a page. This saves a lot of work. It already works fine for English texts. For other languages, we have to find a solution. A possibility is to add a "lang" tag to the "title" template. This is easy, but not completely satisfactory, and I could not find better for now. Another possibility would be to modify the script so that it can deal with templates in other languages. It might be complicated. Does someone want to try? Any other idea?
How does it work?
1. In your preferences, click on Gadgets tab, and then on the "Preload useful templates such as header and textinfo" option.
2. Fill in the {{title}} template with title, author, translator, language if not English, notes.
3. Create a table of contents like this:
* [[/Chapter 1|Chapter 1]] * [[/Chapter 2|Chapter 2]] * [[/Chapter 3|Chapter 3]] ...
4. Click on a red link in the table of contents: you have a page with a preloaded {{header}} template!
If you modify the table of contents, you have to empty the cache of your navigator, and to reload the page.