Help:Adding Pages to Categories and Templates: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(still WIP)
mNo edit summary
Line 36: Line 36:
At the template page, hit create page, and you'll see the edit field box. Type in whatever you need to be said in other pages and save the page. It could be simple text, links to a set of functions, or even as advanced as a bit of code that determines something, such as our future functions template. If you were trying to add to our functions/events then you would just edit a link to your function into the template. Don't screw it up or I will be disappointed in you!
At the template page, hit create page, and you'll see the edit field box. Type in whatever you need to be said in other pages and save the page. It could be simple text, links to a set of functions, or even as advanced as a bit of code that determines something, such as our future functions template. If you were trying to add to our functions/events then you would just edit a link to your function into the template. Don't screw it up or I will be disappointed in you!


From this point, you use the template page name as a tag inside the pages where you want to use it. My template tag is <nowiki>{{Adding_Pages_to_Categories_and_Templates}}</nowiki>
From this point, you use the template page name as a tag inside the pages where you want to use it. My template tag is: <nowiki>{{Adding_Pages_to_Categories_and_Templates}}</nowiki>


===3. Demonstration===
===3. Demonstration===
Line 45: Line 45:
=Category=
=Category=
==What is a Category==
==What is a Category==
Categories group pages together. The categories have their own special page where all the grouped paged are alphabetized. For example here is [[Category:Client_Functions]]
Categories group pages together. The categories have their own special page where all the grouped paged are alphabetized. Think of them like sorting the Wiki into folders. For example here is [[Category:Server_functions|Server_functions category]]


Categories are also <nowiki>{{x}}</nowiki> tags. Wiki knows if it is not a template it is a category, so it uses the same tagging format.
Categories are also <nowiki>{{x}}</nowiki> tags. Wiki knows if it is not a template it is a category, so it uses the same tagging format.
Line 71: Line 71:


==Questions?==
==Questions?==
Best way to reach us is IRC. See the community box on the [[Main Page]] for more info.
Best way to discuss wiki is live on IRC. See the community box on the [[Main Page]] for more info.

Revision as of 17:07, 6 August 2012

Introduction

Did you create a new page, such as a function, and it isn't showing up in a list? Did you try and edit it in only to see {{weird_tags_like_this}} instead of text relating to the page you viewed? Welcome to the world of templates. We have noticed in RecentChanges that people are making pages and not linking to them properly. These pages are being lost in the bowels of the Wiki!

We also use categories in this wiki, but they are not as crucial as templates. Please read on to learn about both and to understand how to contribute to our wiki properly.

Template

What is a Template

Its like a big copy paste on a clipboard. You write a template tag on another page and it writes everything that was on the template page.

Why Use Templates? It allows the same information to be represented in multiple places, without duplicating texts and updating them manually numerous times.

Example? Look at the page source (edit button) on our functions or event pages. You can see that the functions aren't actually listed there, each function group has its own template. The main use for this is to fill out the "See Also" section of individual functions with their related functions.

How Do You Make/Edit a Template?

The best way to teach is by example. I will need a template to direct people to this guide from multiple pages in the wiki. Let's just create this template together! FUN!

1. Choosing a Template Name

The best template name explains what it is. Typically the best thing is to make the template URL identical to the actual page. Therefore I am going to use:

http://wiki.multitheftauto.com/index.php?title=Template:Adding_Pages_to_Categories_and_Templates

IMPORTANT: Remember that all wiki pages are case sensitive. The same page can exist in uppercase and lowercase! Capitalize appropriately.

{{Adding_Pages_to_Categories_and_Templates}}

If I tried to link to a template that doesn't exist this happens: Template:Link to nonexistant template click here to create lazypants

So as you can see, it is better we create the template before attempting to link to it!

2. Filling out the Template

At the template page, hit create page, and you'll see the edit field box. Type in whatever you need to be said in other pages and save the page. It could be simple text, links to a set of functions, or even as advanced as a bit of code that determines something, such as our future functions template. If you were trying to add to our functions/events then you would just edit a link to your function into the template. Don't screw it up or I will be disappointed in you!

From this point, you use the template page name as a tag inside the pages where you want to use it. My template tag is: {{Adding_Pages_to_Categories_and_Templates}}

3. Demonstration

So here I will actually link to the template. If you check the template page source, you will see exactly what is printed below:

Contributors: Did you create a page but it's not on this list? Confused? Read: Adding Pages to Categories and Templates

Category

What is a Category

Categories group pages together. The categories have their own special page where all the grouped paged are alphabetized. Think of them like sorting the Wiki into folders. For example here is

Categories are also {{x}} tags. Wiki knows if it is not a template it is a category, so it uses the same tagging format.


Categories simply group pages together as they share a common bond. For example, all the client functions have a category. A page could be in multiple categories if you wish. Generally people have gotten this right even if they did not intend to, because the person copied a template from another page and edited it and left the category tag in.

More Info

Lists of Templates and Categories

Looking template and category listings? This is one thing SpecialPages is for.

Templates:
Special:UncategorizedTemplates
Special:UnusedTemplates
Special:WantedTemplates
Special:MostLinkedTemplates

Categories:
Special:Categories (all categories overview)
Special:UncategorizedCategories
Special:UnusedCategories
Special:WantedCategories
Special:MostLinkedCategories

Questions?

Best way to discuss wiki is live on IRC. See the community box on the Main Page for more info.