Snippet List
Utility functions for generating dummy ("lorem ipsum") text, with text from
the "Karel ende Elegast" old-Dutch epic poem. [wikipedia](http://en.wikipedia.org/wiki/Karel_ende_Elegast)
by Wicher Minnaard <[email protected]> [website](http://smorgasbord.gavagai.nl/)
Sort-of monkey-patches django.contrib.webdesign.lorem_ipsum (it's an experiment).
Hopefully threadsafe, so both lorem_ipsum and elegast module functions can be
accessed simultaneously.
- mockup
- lorem-ipsum
- karel-ende-elegast
The loremipsum tag generates random content for use in mockups. It takes this content from Cicero's De finibus bonorum et malorum. By default you get a random number of paragraphs up to 6, but you can affect this behaviour by passing in parameters for quantity and units. Units can be "paragraphs" or "words"; the default is paragraphs. Quantity dictates the number of units returned.
If your django.conf.settings.TEMPLATE_DEBUG is True, then no output is returned, so you should be OK in the event you leave the tag in a production template.
Syntax:
{% loremipsum %}
{% loremipsum quantity="3" units="paragraphs" %}
By leaving the behaviour as random, you can see how your layout handles varying amounts of content. Handy, especially for multi-column pages. [Here's a stoopid site](http://lakes.knoxzilla.com/) where I'm playing with random text, pictures, business listings, etc.
I do plan to add a "corpus" parameter to allow you to put your own corpus between lorumipsum and endloremipsum tags and a template parameter to specify the corpus should come from a template, but this has suited me well thus far.
2 snippets posted so far.