Forum:How can you make something appear on every page?

Is it possible to make a feature such as a template appear on all pages of a wiki? If so would it also be possible to have it appear above page headings?--Soul reaper 15:08, June 12, 2011 (UTC)


 * You mean like taglines?


 * I'm not entirely sure I know what you mean by taglines but I don't think it's the same thing I'm talking about. Say I have a template with a number of links in it. Is there any way to use the css and js to make it appear on every page?--Soul reaper 15:54, June 12, 2011 (UTC)
 * Look here for taglines. And yes using js you can make something appear on every page.
 * The link you posted is dead. Do you know how to use the JS to make something appear on every page?--Soul reaper 16:00, June 12, 2011 (UTC)
 * Oops I added an s there so here it is. And can you give me the link to the template that you want to make it appear on every page?
 * I see what you're talking about, so no it's not a tagline but that will help with something else I've been working on so thanks! The template can be found here--Soul reaper 16:06, June 12, 2011 (UTC)

That's a huge template are you sure you want to make it appear on pages because it may disrupt your reading?
 * I want to try it out at least, I was hoping to put it above the page headings if possible but yes I would like to make it appear on all pages--Soul reaper 16:19, June 12, 2011 (UTC)
 * ToU violation. You can't push the content area down at all.
 * I think the relevant part of the ToU is here:
 * Not intentionally block, remove, or otherwise obstruct the proper functioning and view of advertisements, and/or user interface and functionality by other users, including but not limited to changing or adding javascript or CSS changes to the Service that would prevent the proper display or function of advertisements and/or user interface and functionality.
 * So by my reading adding a navigation bar to every page doesn't "intentionally block, remove, or otherwise obstruct the proper functioning and view of advertisements, and/or user interface and functionality by other users".
 * Of course, Wikia doesn't really like to write all of its policies down, so you could be violating one of the many unwritten ones. ;-)
 * -- Fandyllic (talk &middot; contr) 12 Jun 2011 6:09 PM Pacific
 * It falls under one of the broad statement pieces. Has to do with ad revenue. It's the reason why you're not allowed to use a wordmark that's over 65px tall.
 * This is for my personal css/js and won't affect any other users. It won't interfere with any advertising so I hardly see how it violates the ToU--Soul reaper 03:38, June 13, 2011 (UTC)


 * As Soul reaper stated, it's for his personal css/js, so it doesn't fall under that TOU statement; it will be fine. I'd be interested in knowing the basics of this too. Tardis1963 05:10, June 13, 2011 (UTC)


 * Yeah, that would be nice. For Oasis skin is there any way to put a nav bar or something pn all your pages above the content area but below the nav bar? Using padding or Wikia.css or something?-- Andrew Schlieffen (talk &middot; contr) 16:49, June 13, 2011 (UTC)


 * So long as we all use this on our personal CSS/JS and not the wiki wide ones it doesn't violate the ToU. We're only altering out own experience, no one else will be affected--Soul reaper 14:34, June 14, 2011 (UTC)

(unindent) Indeed it would. It's just worth pointing out because the broad statement violations tend to fall through the cracks.

On to the task at hand - if you know about HTML/CSS/JS already, you can get the CSS selector from the DOM and append the HTML you want with jQuery, as the code is executed on every page load this will add it to every page. Otherwise, you'll need to learn some basic jQuery and HTML. If you aren't familiar with HTML, you can read up on the basics here. You don't need to know much, the only really "new" thing there would be the  tag, which is just a link (  is the same as  ). To add something on every page, you'll need the HTML code for what you want to add. For example, this box:

Which is. Then you need the CSS selector for where you want to add it, for example, the side rail. You can use an inspector tool such as Firebug or the built in one on Chrome to find the reference. Then you put it into a jQuery statement, in the form of, or in our example,. This will put it at the end of whatever you're appending to, in this case the rail. Putting it at the beginning would be  instead of. and  can also be used, which put it outside the element you're selecting (  is inside the rail, where as   is outside the rail). Finally, make it run on every page load by putting it in. Thus, our finished code is. This can be used to add anything anywhere, although be aware that it doesn't use wikitext.

Alternatively, if you can't make it work for yourself, you can ask me and I'll give you code for specific things.


 * So, you would put  in your Wikia.css-- Andrew Schlieffen  (talk &middot; contr) 17:01, June 14, 2011 (UTC)
 * This is for Wikia.js. CSS isn't very good at adding things.


 * I added it to my Wikia.js here does Wikia.js even work or do I have to ad it to my Common.js? Also, does the code look correct? I even pressed CTRl-F5 to refresh the page, still wont work. Any ideas?-- Andrew Schlieffen (talk &middot; contr) 17:50, June 14, 2011 (UTC)
 * It's working for me. I see the box in the rail.