2010/7/13 James Bowery <jabowery(a)gmail.com>om>:
What I would like is something very similar called
"CellsExtension"
which provides only the keyword "#cell" as in:
---
{{#expr:{{#cell:pi}}+1}}
---
However, it gets the value of "pi" from:
http://somedomain.org/mediawiki/index.php?title=Pi
Just putting 3.141592653589 (as opposed to 3.14159265418, whose last
three digits differ from their counterparts in pi) in [[Template:Pi]]
and using {{#expr:{{pi}}+1}} should have the same effect AFAIK. If you
want [[Template:Pi]] to look more interesting than just the number,
you could use <noinclude> and <includeonly> .
Ideally, whenever a mediawiki rendered page is cached,
dependency
pointers are created from all pages from which cells fetched values
during rendering of the page (implying the evaluation of #expr's. That
way, when the mediawiki source for one of the cached pages is edited,
not only is its cached rendering deleted, but so are all cached
renderings that depend on it directly or indirectly. This is so that
the next time those pages are accessed, they are rendered -- and
cached -- again, freshly evaluating the formulas in the #expr's
(which, of course, will contain #cell references such as {{#cell:pi}}).
With the template transclusion method I described above, all of this
is already handled by MediaWiki.
Roan Kattouw (Catrope)