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> | ||
− | <code>{{:Team:YourTeam/Templates/OurHeader}} | + | <code>{{:Team:YourTeam/Templates/OurHeader}}<br/> |
− | <html>Our page</html> | + | <html>Our page</html><br/> |
{{:Team:YourTeam/Templates/OurFooter}}</code> | {{:Team:YourTeam/Templates/OurFooter}}</code> | ||
<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> |
Revision as of 00:27, 19 September 2015