Difference between revisions of "Team:Cambridge-JIC/Wiki Design"
Line 31: | Line 31: | ||
<h3> Using Templates </h3> | <h3> Using Templates </h3> | ||
<p>Using templates helps to avoid typing in the same html again and again, and also allows you to make changes in one place that apply to all your pages. We have two templates we use, <code>Team:Cambridge/Templates/Menu</code> and <code>Team:Cambridge/Templates/Footer</code>. These templates are created as normal new pages, and are then directly <em>included</em> in your page using MediaWiki syntax:</p> | <p>Using templates helps to avoid typing in the same html again and again, and also allows you to make changes in one place that apply to all your pages. We have two templates we use, <code>Team:Cambridge/Templates/Menu</code> and <code>Team:Cambridge/Templates/Footer</code>. These templates are created as normal new pages, and are then directly <em>included</em> in your page using MediaWiki syntax:</p> | ||
− | < | + | <pre>{{:Team:YourTeam/Templates/OurHeader}} |
− | <html>Our page</html> | + | <html>Our page</html> |
− | {{:Team:YourTeam/Templates/OurFooter}}</ | + | {{:Team:YourTeam/Templates/OurFooter}}</pre> |
<p>Note carefully the above notice regarding the function of the html tags - this means that your template can end without closing all its tags and it won't mess up your page! For example, you can wrap your site in a container div by opening the tag in your header template, and then closing it in your footer template.</p> | <p>Note carefully the above notice regarding the function of the html tags - this means that your template can end without closing all its tags and it won't mess up your page! For example, you can wrap your site in a container div by opening the tag in your header template, and then closing it in your footer template.</p> | ||
<h3> Using CSS and JS </h3> | <h3> Using CSS and JS </h3> |
Revision as of 00:30, 19 September 2015