01.12.2012 Views

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

138<br />

��<br />

��<br />

��<br />

� Store complicated layout elements separately in templates so<br />

as not to confuse inexperienced users, and comment on <strong>the</strong> way<br />

<strong>the</strong>y function.<br />

� Select meaningful names for pages, templates and variables<br />

that can be understood without a great deal of effort.<br />

9.4<br />

Usage Examples<br />

This section is intended to serve more as motivation than instruction.<br />

Its aim is to demonstrate how <strong>the</strong> individual elements of <strong>the</strong> wiki interact<br />

and provide an incentive to find your own creative solutions<br />

for everyday problems on <strong>the</strong> web.<br />

9.4.1<br />

Main Page with News<br />

Problem: After <strong>the</strong> visitor number of <strong>the</strong> tribal initiative's wiki increased<br />

dramatically, it was decided that <strong>the</strong> main page shall be secured<br />

so that only administrators can change it. Only a small area,<br />

“News,” is to remain editable by everyone.<br />

Solution: Locking <strong>the</strong> main page is done by an admin. He or she<br />

simply activates <strong>the</strong> “protect” tab on <strong>the</strong> main page and indicates as<br />

a reason: “Main page requires special protection.” Now, only administrators<br />

can alter <strong>the</strong> page. A small area, however, will remain open.<br />

This is realized via a fur<strong>the</strong>r page, News, which anyone is free to<br />

edit. This page is embedded into its respective location on <strong>the</strong> title<br />

page as a template:<br />

{{:News}}<br />

Note <strong>the</strong> colon, which indicates that <strong>the</strong> article is located in <strong>the</strong> main<br />

namespace. It thus prevents news from disappearing from <strong>the</strong> template<br />

namespace. The page can thus also be easily accessed separately.<br />

9 Life in MediaWiki

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!