Page Count
ErichSteinboeck 28 Mar 2009 10:33
I've just made available a solution how to count pages.
The general idea was simple:
- write some (trivial) JavaScript that displays the length of a string,
- use the Horizontal ListPages idea to have ListPages generate a string of X's — one X for each page, and
- feed the string of X's into the URL of an [[iframe ...]] tag
Actual implementation though was much harder than anticipated. For example it wasn't possible to use [[iframe ...]] as iframe parsing is done before line concatenation (which removes the trailing backslashes from the “Horizontal ListPages” part) and so the iframed code (the JavaScript that calculates the string of X's length) wouldn't pick up a correct string of X's. It took me quite a while to find that [[embed]]<iframe ... would solve this issue, as embed parsing is done after line concatenation.
Please have a look at this worthwhile howto:page-count and rate it up.
gerdami - Visit Handbook en Français - Rate this howto:import-simple-excel-tables-into-wikidot up!