back to
UkMirDesign
This site documents the progress on the layout of the imc uk mir startpage. It includes
Grid: Elements for IMC UK mir startpage
We've collected all elements from both IMC UK active and IMC UK mir page. This grid is also a proposal for the arrangement of the elements. Please note: the colours are random, this is just about the structure.
- imc uk mir frontpage proposal 1 :
Layout grid - discussion
- Process Box -- this is not needed -- it's actually part of the list of IMCs
- Publish button should be more prominent, like IMC NYC | email |
- Archive bar that spans the middle and right hand column should span all three columns due to the way in which HTML tables work | email |
- Colour Scheme Discussion | email 1 | 2
- Search button better positioned in archive bar?
Templates and file names for these elements
-
navigation.top.inc
- The top navigation menu, editorial guidelines to about us. Generated from navigation.top.template
.
-
navigation.topics.inc
- The list of topics in the left column. At the moment the topics are only regions, this might not always be the case. Generated from navigation.topics.template
.
-
navigation.banners.inc
- The banners in the left column, video projects banner to varying banner. Gnerated from navigation.banners.template
.
-
navigation.search.inc
The search box. Generated from navigation.banners.template
.
-
navigation.languages.inc
The list of languages. Generated from navigation.languages.template
.
-
navigation.imcs.inc
The list of other IMCs. Generated from navigation.imcs.template
.
-
navigation.archives.inc
The set of links to the archives at the top of the middle and right columns. Generated from navigation.archives.inc
.
-
navigation.publish.inc
The publish and add an event links at the top of the right hand column. Generated from navigation.publish.template
.
-
navigation.events.inc
The hand coded list of upcoming events in the right hand column. Generated from navigation.events.template
.
-
navigation.newswire.inc
The newswire navigation bar in the right hand column. Generated from navigation.newswire.template
.
HTML style for navigational fragments
All the Mir templates are, at the moment, invalid HTML 4.01. There is some interest on the Mir list in moving to XHTML 1.0 Transitional but this probably won't happen quickly.
I'm going to try to do stuff using a minimalist HTML 4.01 style, for example this, in
navigation.template
:
<table cellpadding="8" cellspacing="0" border="0" width="100%" bgcolor="#aaaaaa">
<tr>
<td>
<b>${lang("navigation.languages")}</b>
<list languages as l>
<br><a href="${config["Producer.DocRoot"]}/${l.code}/">${l.name}</a>
</list>
</td>
</tr>
</table>
Has been changed to this in
navigation.languages.template
:
<div class="languages">
<h2>${lang("navigation.languages")}</h2>
<p>
<list languages as l>
<a href="${config["Producer.DocRoot"]}/${l.code}/">${l.name}</a><br>
</list>
</p>
</div>
The difference in HTML style is that the second version uses structural elements and is designed to be stlyes using CSS (note the class attribute on the div element).
How it works on the server
.inc
files are generated from
.template
files and this is controlled in
producer.xml
, see above for the list of files.
Can we add and customise the .template files?
Yes you just need to add a
Generate
element in
producer.xml
for each new
.template
file, like this:
<Generate
generator="/navigation.languages.template"
destination="${config.storageRoot}/${pathprefix}/navigation.languages.inc"/>
How often are the .inc files generated?
The
.inc
files that are generated from the
.template
files with references in
producer.xml
how often are they generated?
That's entirely up to yourself... you can configure:
- which producers need to be called when an article is posted
- which producers need to be called when a comment is posted
- which producers need to be called when someone clicks on "generate all new" in admin
- call any producer yourself via the advanced page
- configure cronjobs to call producers...
You always call a producer/verb combination... so, also check out the <verbs> section.
SSI and freemarker includes
There are two ways of doing includes one with SSI that Apache does before serving the page like this:
<!--#include virtual="/${language.code}/navigation.languages.inc" -->
And one with freemarker:
<include "cities.inc">
SSI should be used on things that need updating without regenerating -- things like archive navigation -- you don't want to regenerate all archive pages every time a new page is added so it's wise to use SSI for that. Archive navigation in this example is the list of more pages like this: page - 1 | 2 | 3 | 4 | 5 ... etc.
--
IonNec - 18 Apr 2003
-- Added filenames for elements -
ChrisC - 19 Apr 2003
-- Added code example, and note about process box -
ChrisC - 21 Apr 2003
-- Added heading to document discussion on elements, added TOC -
IonNec - 22 Apr 2003
-- Added How it works on the server section -
ChrisC - 22 Apr 2003