-
How to make infbox
PRobably the fourth time this has been brought up but I have no found my answer.
I have bee trying to put infoboxes onto my website for like a week now, and the code is not working. IDK what I am doing differently or wrong, but it's just not working. Nothing shows up.
-
Here is an example:
Create a template called "Infobox" (with "Template" checked in the editor under "Treat this page as"). Give it contents like:
Code:
[div] position="sidebar" | [table1]
|-
| Name
| {{{name|Default Name}}}
|-
| Alias
| {{{alias|AKA}}}
[/table1][/div]
Create a wiki page with contents like:
Code:
[template]Infobox
|Name=FirstName LastName
|Alias=Rusty
[/template]
If this does not work, please describe what you do see. Is it rendered as a red link? Do you see raw code as output?
If you get no output whatsoever from this, then make sure that the template is not waiting for approval. It will not render inside another page until it gets approved.
-
When using the code given, Ikate Keda and I end up with this, the bit that I circled in red. As you can see, it's way out there, which is probably related to that 'sidebar' position that was in this bit of code. I don't even know how many positions there are or where to read about them, I admit.
Right now, we're just trying to study and understand the code, and haven't had any success in finding any examples to look at. This site for an example, ended up leading us to a template of a template, but not the source code for the template of templates.
We're probably asking for a lot more than we realize, but please be patient with us. We used to use dokuwiki, and though this is definitely a lot more powerful, it's also more complex, and we're still figuring things out.
-
Yes, it's all the way on the right because of the sidebar position. You don't have to specify a position if you prefer it in the main body. It will also accept HTML style attributes (like style="background-color: green; font-size: 20px")
Otherwise, please clarify what I am looking at.
If this is where the first code sample was entered, then you have forgotten to activate the "Template" behavior in the Edit tab.
If this is where the second code sample is entered, it is strange to me that the DIV is rendering, but the values in {{{ }}} are not.
-
I just realized something. This is all CSS, is that correct? Originally, we thought this was some sort of wiki-code like what dokuwiki uses, so we asked with the intent of 'how do we do it like this?' more or less. But we're just going to have to learn CSS it seems?
-
We figured it out. When I have the motivation I'll explain stuff here.