Forums: Helping Hand > Location Template

Use the following template for a nicely presented post:

{{Forum post|Write your message here!|~~~~}}

Forgive me if I'm in the wrong location to ask this - but what is it that's put in the source code for the Location Template (!)?

Thanks — User:Othya

Here is fine, but the Talk page for the template is a bit tidier.
As for your question, I'm afraid I don't know what you mean. What source code? You can see the wiki code for it by clicking edit. But what do you mean by 'it'? — BadCatMan (talk) 13:15, July 25, 2013 (UTC)

I'm going to take a wild guess that Othya is asking about the {{!}}'s that occur throughout the template, and any other template that produces a table. Those are used to insert the pipe character (aka, vertical bar), " | ", into the output stream and not be interpreted as a separator in an "#if" statement. Does that answer your question?

Moviesign (talk) 13:44, July 25, 2013 (UTC)

Yes it does, thank you! I thought it was only showing the vertical bar because it was protected.

Thanks again - User:Othya

One more question that is related.. again I apologize for any ignorance in regards to writing wiki material.
Why if I copy everything word for word does the location template not align things properly for me? Example: copy of location template
Compared to the Template:Location on this wiki.

Thank you - User:Othya

The reason things do not line up is because you do not have the "infobox" style sheets (CSS files) installed on your wiki. I have just added the generic "wikitable" class to your template and put the "float:right;" style attribute on the first line of your Location template. I'm sorry, I do not have access to the CSS files to help you any more than this, but at least this should get you started. If you want to learn more about tables, perhaps start here. If you want to learn more about style sheets, I recommend w3schools. Good luck!

Moviesign (talk) 15:00, July 25, 2013 (UTC)

Thank you very much Moviesign! - this was very helpful! - User:Othya

OK my location template looks perfect now (the example)!

My only problem now, is that using it as a template on other pages doesn't seem to be working.. for example, I created a copy&paste page Silverymoon.. the formatting looks like it applied itself, but not the aligning or style (even though in the example on the locations template, it did apply perfectly)

It looks like you are missing the "float:right;" style parameter somewhere in your CSS file—it allows text to flow around the box. That's my best guess.

Moviesign (talk) 17:14, July 25, 2013 (UTC)

OK I'll look at that. The thing that makes no sense to me is that exactly what I want is displayed on the template page (the example)... but the example won't work on the doc page or on the Silverymoon page.

If it works in one place but not the other, then maybe you have a namespace problem. Some things are restricted to only work in certain namespaces. "Template:" is a namespace, and so is "User:" and "Forum:" etc. As a test, you could try copying your Silverymoon page to "Template:Silverymoon" and then see how it displays. If that works, then I'm guessing (really guessing) somewhere in your wiki settings must be something that is restricting templates to the Template: namespace. Good luck!

Moviesign (talk) 18:23, July 25, 2013 (UTC)

Thanks again for your help. I tested the way you said and made a copy of Silverymoon as Template:Silverymoon, but that didn't work. It still is working perfectly on the Template:Location page.

Othya (talk) 18:48, July 25, 2013 (UTC)

I did a "View Page Source" on your Silverymoon page and ours. Ours has <table class="infobox2 infoboxright"> at the top of the page (after all the wikia stuff) and yours just has <table>, so whatever style sheet changes you made are not being seen by your Silverymoon page. Be sure to clear your browser cache when you make style sheet changes. I'm seeing your Template:Location page is messed up now too. You must have done the right thing at one point and then changed one more thing, so try to go back one step at a time, clearing your browser cache each time. Sometimes you have to purge wiki pages for them to see changes in things like style sheets. Do this by appending "?action=purge" to the URL of your pages and it will re-fetch everything from the wikia server. Hope this helps.

Moviesign (talk) 19:16, July 25, 2013 (UTC)

OK I purged everything (including css pages) and cleared cache twice. So now:

FR Silverymoon = My Silverymoon
FR Template:Location = My Template:Location
FR MediaWiki:Wikia.css and MediaWiki:Common.css = My Wikia.css and Common.css
I even copied Common.js as well in case that would make a difference.

At this point I've been asking for a lot of help... is there anything I could do for you for helping? Does the forgotten realms wiki have a donation link ?

You're welcome. :) No donation link, we're just hobbyists. I'm glad it finally worked. Good luck with your wiki!

Moviesign (talk) 13:38, July 26, 2013 (UTC)

Here's an easier question

How do I remove the borders in the "Races" and "Rulers" section? (Silverymoon)

Hmm... That must be a high-level style setting for all tables or something. If you can't find it in your CSS files you can override it in the templates. Add "border:0;" to the style parameter tag in your {{Split table}} and {{Percentage table}} templates. I think that should do it.
Community content is available under CC-BY-SA unless otherwise noted.