[Wikipedia-l] 300,000 is a much better milestone

Erik Moeller erik_moeller at gmx.de
Mon Aug 4 21:56:00 UTC 2003


Daniel-
> I don't agree with this at all - each project needs to have its own very
> distinct logo so that each project can be instantly recognizable when
> readers are using interproject links. Readers need to know very fast where
> they are.

They should, but we also need a common visual identity to let people know  
that they are on a Wikimedia project site. For example, if Wiktionary had  
a cartoonish logo, Wikipedia a photo-based logo and Textbook-Wiki an  
abstract, thin line logo, there would be no common feel about all  
projects. People might conclude that Wiktionary and Wikipedia are only  
distantly related.

It's about finding the right balance -- the logos should not look too  
similar, because the sites themselves already look relatively similar, but  
they also should not look too different. This is best accomplished by  
simply asking the original artist to draw the logos for the other projects  
as well.

> Oh yes it is very essential - without it we cannot organize books in the
> WikiWay. Yeah sure we can hard code navigational aids like Next and Previous
> Page but 1) that is tedious, 2) it is very inflexible (any change of
> organization in a book's TOC would be difficult to implement) and 3) that
> ensures that each module can only be used for a single book.

While this may all be true, I do not see any of these as requirements  
before the project is announced to a larger audience.

That being said, let me explain how I think a template system can be used  
to accomplish the kind of dynamic multi-page TOC/navigation structure you  
want.

With template system, I am referring to the mechanism whereby content from  
other pages in a new template namespace can be transcluded, and keys/ 
values are assigned by the calling page:

|Country table
|Name => Germany
|Population => 83 million
|____

etc.

This would transclude the page [[Template:Country table]], which could  
look like this:

  <table border=0 width="200">
  <th><td colspan=2>== %%Name%% ==</td></th>
  <tr><td>Population</td><td>%%Population%%</td></tr>
  </table>

etc.

Now this is a very simple template system. A more complex template system  
would support things like conditional blocks, loops and so forth.  
Furthermore, we could have some automatically prefilled variable names.  
For example, %%PAGENAME%% would contain the name of the page from which  
the template is transcluded.

With these features, I could create a navigation footer simply by putting

|Organic chemistry navigation
|____

on the page. [[Template:Organic chemistry navigation]] could contain  
something like

---------------------------------------

[!
%%titles%%=
  About this book
  Foundational concepts
  Alkanes and cycloalkanes
  Introduction to reaction
%%currentPageID%%=
  !!look up %%PAGENAME%% in %%titlesArray%%!!
]!

[? %%currentPageID%%==-1

Table of contents:
<UL>
[* %%titlesArray%%

 <LI>%%CURRENTVALUE%%</LI>

*]
</UL>
?]

[? %%currentPageID%%!=-1
[!
%%prevPage=
  %%titlesArray[currentPageID-1]%%
%%nextPage=
  %%titlesArray[currentPageID+1]%%
!]

Navigation:

[[%%prevPage%%]] %%PAGETITLE%% [[%%nextPage%%]]

?]
----------------------------------------------------------

Explanations:

[? .. ?]
  conditional blocks, are only executed if condition in first line is true
[! .. !]
  instruction blocks, are always executed (for instructions that have more
  than one line, all lines after the first one have to be indented)
[* .. *]
  foreach blocks, cycles through the value in an array and stores the
  value for each iteration in %%CURRENTVALUE%%
%%..%%
  variable names, some of which are passed to the template by the calling
  page, others are predefined or defined by context (see above)
!!..!!
  internal function calls -- the template syntax provides functions for
  sorting, looking up values in an indexed array etc.

The template looks up the current page in the array, checks whether it is  
the index page (if so, generates the TOC) or a content page (in which case  
it generates the navigation page linking to the neighboring pages).  
Simplified -- doesn't check if neighboring pages exist.

While this may seem complex, keep in mind that the above example is as  
generic as possible. You can add titles to the TOC and navigation at any  
time by simple modifying the titles array, and you can change the layout  
of the TOC and the navigation arbitrarily. A built in function could be  
provided for TOCs using a standard layout.

Regards,

Erik



More information about the Wikipedia-l mailing list