User:Henstepl/Blog1

Hey! User:Henstepl here. I saw that some users were having trouble making navboxes, and didn't really see a way for them to move forward that didn't involve gross Lua that involves its own learning curve. So I'm making a guide to show you how to make a simple navbox! It's super easy!

Every wiki on creation has a template at Template:Navbox identical in content to the navbox from Starter Pages Wiki. It could be used as a meta template, meaning one could create a second template, say Template:Navbox Foo, that calls Template:Navbox. But this is restrictive, and might be too much for new users to deal with, so we won't treat it as a meta template.

Let's just make our own.

Creating the Navbox
The first step is deciding where to put it. On my subway, the Unofficial Subway Sandwich Artists' Wiki, I placed my navbox at Template:Navbox SUBWAY. "Navbox " is a pretty standard location for navboxes.

With our location in mind, let's create the navbox. ...= Do you have the default form of Template:Navbox installed on your wiki? Click "No, or I don't know" or "Yes". No, or I don't know= Remember to substitute in the name of the infobox you want instead of "SUBWAY"! If you're asked for a template type, use "Navbox".
 * 1) Go to the page Template:Navbox SUBWAY on your wiki and hit "Edit".
 * 1) Optional - As an edit summary, paste the following:

This custom edit summary is optional but a good idea. Remember to substitute in the name of the infobox you want instead of "SUBWAY"! If you're asked for a template type, use "Navbox".
 * 1) In another tab, go to the code for Template:Navbox on Starter Pages Wiki and copy the source code to the field for "Template:Navbox SUBWAY" on your wiki.
 * 2) Save the page - I advise you don't edit the code any before you save it, so you have something clean to revert to if necessary,
 * -|Yes=
 * 1) Go to the page Template:Navbox SUBWAY on your wiki and hit "Edit".
 * 1) Optional - As an edit summary, paste the following:

This custom edit summary is optional but a good idea.
 * 1) In another tab, go to Template:Navbox on your wiki and copy the source code to the field for "Template:Navbox SUBWAY" on your wiki.
 * 2) Save the page - I advise you don't edit the code any before you save it, so you have something clean to revert to if necessary.

Customizing the Navbox
First, let's get a sense for the code of the navbox.

It's pretty simply laid out even if you're not super familiar with wiki markup. Let's get editing!

'''DON'T CHANGE THE PAGE Template:Navbox! You're supposed to leave it unchanged and edit other infobox templates, which you can copy from Template:Navbox.' Instead, you should edit Template:Navbox SUBWAY, or whatever you've decided to call the template, on your'' wiki

Editing header and content

 * Click here to see how I did it!

By default, the navbox has one header, highlighted in red in the above code. The  is where the header text would be inserted if we were using this as a meta template (calling a   parameter), but we're not. So, just go ahead and replace that with what you'd like your header to say!

Underneath the header is a content element, highlighted in. By default it is filled with a. We'll just replace that with content too. Most people would put a lot of links here, separated by , which on page save turns into &bull;. Neat!

Moar headers! Moar contents!

 * Click here to see how I did it!

One of the reasons we're not using the default Template:Navbox as a meta template is that it's restricted to one header. Maybe we want more, though. So let's just add some. It's as easy as copying the entirety of the red and blue parts of the above code, and pasting them right below themselves. Then just fill them in, as we did in the previous step!

Coloration

 * Click here to see how I did it!

The default color of the header is pretty blatant and not in line with most wikis' styles. We can go ahead and change it by changing the background-color attribute of our headers. In the above code, this styling and the one for the color of the text itself is highlighted in yellow.

You may use a hex color generator to find your desired color, or you might just get by with "red" or "blue" if it suits you.

Documentation
Documentation is a good idea for any template. This is a static template, with no parameters, so as it is, we can describe its function in one line entirely:

Go ahead and save that text to Template:Navbox SUBWAY/doc on your wiki.

We did it!
Now we have a useful navbox template to put at the bottom of our articles! Hooray! That was easy, wasn't it?