Consumer Rights Wiki:Write your first article!: Difference between revisions

No edit summary
Advanced stuff is pretty much useless except for templates, which don't need to be explicitly talked about
Line 69: Line 69:


:*You can experiment in the [[Sandbox|sandbox]] if you want to try editing without affecting any real pages.
:*You can experiment in the [[Sandbox|sandbox]] if you want to try editing without affecting any real pages.
===Advanced editing===
You can safely ignore this section until you have some experience under your belt and are comfortable with the basics, but read on if interested!.
*If you want to add colored text, backgrounds, and borders, then the wiki also supports HTML and CSS styling, mainly through the source editor. To use this, first surround the text you want to style in html tags like <code><nowiki><span>this</span></nowiki></code> or <code><nowiki><div>this</div></nowiki></code>, and then in the first tag, add style="property1;property;2;property3; where each property has a semicolon after it, for example <code><nowiki><span style="font-size:10px;color:red;font-weight:bold;>test</span></nowiki></code> becomes <span style="font-size:10px;color:red;font-weight:bold;">test</span>.
Speaking of colored text and backgrounds, you can use '''templates''' to reuse common elements (like infoboxes, alerts, and formatting):
[[Help:Templates|Templates]] work using a feature called '''transclusion'''. This just means one page can automatically include the contents of another. When the original page is updated, every page that includes it will show the updated version too.
There are a few ways to use templates:
*In the visual editor, click '''Insert > Template''' to bring up the template wizard.
*Or, in source mode, type the code yourself:
**<code><nowiki>{{Template:Template name}}</nowiki></code> — when the page starts with <code>Template:</code>
**<code><nowiki>{{:Page name}}</nowiki></code> — when it's a regular page (like a subpage or shortcut)
For example:
*<code><nowiki>{{Main Page/In The News}}</nowiki></code> brings in the "In The News" section from that subpage.
*<code><nowiki>{{InfoboxCompany}}</nowiki></code> includes a company style infobox.
You can combine this with HTML and styling to make really useful and reusable page elements. If you're curious, go look at the source of one of the templates on the wiki!
''This stuff is optional, but powerful — it's worth playing around with once you've gotten the hang of basic editing.''


===Adding references===
===Adding references===