User:Dantman/Skinning system/Template syntax/Wiki-like template syntax
Appearance
This page is a part of Daniel Friesen's Skinning system plans. This page details an idea which was rejected. |
- (Platonides)
It would use a brace syntax as placeholder value between the literal tag syntax of html. It would not be supporting wikitext, or run through the parser, just the Preprocessor.
<div id="globalWrapper">
<div id="column-content">
<div id="content" lang="{{#lang: special}}">
<a id="top"></a>
<div id="siteNotice" mw:if="sitenotice">{{SITENOTICE}}</div>
<h1 id="firstHeading" class="firstHeading">{{TITLE}}</h1>
<div id="bodyContent">
<mw:loop for="subtitle">
<mw:this />
</mw:loop>
{{#if:{{{NEWTALK|}}}|<div class="usermessage" mw:if="newtalk">{{{NEWTALK}}}</div>}}
<div id="jump-to-nav" mw:if="showjumplinks">{{jumpto}} <a href="#column-one">{{jumptonavigation}}</a>, <a href="#searchInput">{{jumptosearch}}</a></div>
<!-- start content -->
{{BODYTEXT}}
{{CATLINKS}}
<!-- end content -->
{{dataAfterContent}}
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one" lang="{{#lang: user}}">
<div id="p-cactions" class="portlet">
<h5>{{views}}</h5>
<div class="pBody">
<ul mw:loop="content_actions">
<mw:loop variable="content_actions">
<li><a href="{{{tab}}}">{{{key}}}</a></li>
</mw:loop>
</ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5><mw:msg key="personaltools" /></h5>
<div class="pBody">
<ul mw:loop="personal_tools">
<mw:loop variable="content_actions">
<li><a href="{{{tab}}}">{{{key}}}</a></li>
</mw:loop>
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url({{logopath}});" href="{{nav.mainpage}}" mw:tooltip="p-logo" accesskey></a>
</div>
<script>if (window.isMSIE55) fixalpha();</script>
{{{SIDEBAR}}}
<mw:loop variable="portlets">
<div class="generated-sidebar portlet" id="p-{{{key}}}" {{#tooltip|p-{{{key}}} }}">
<h5>{{{header}}</h5>
<div class='pBody'>
<mw:loop variable={{{portletitem}}}>
{{{content}}}
</mw:loop>
</div>
</div>
<mw:loop>
<!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer" lang="mw:user">
<div id="f-*ico">
<mw:loop variable="icons">
{{{1}}}
</mw:loop>
</ul>
</div>
</div>
My notes: Dantman
- The use of {{#lang:special}} loses the advantages that lang="mw:page" has of removing redundant lang attributes while improving proper lang tagging of blocks on the page
- I believe we'll lose the context sensitivity that the template syntax has, at least if we don't want to make significant changes to the preprocessor
- The {} happy WikiText syntax is a mess to write templates with.
- Without changes to the preprocessor I believe it will also be fairly tricky to extract information like that planned to be extracted from <mw:region [...] />