Nuggets

Nuggets are similar to macros. The predefined nuggets are mostly used in the template BaseRendering.tmpl and are used to create the WebLog pages in the cloud.

Taking the example of the firstBelowCalendar nugget, if this is defined it will appear in the box below the calendar that normally contains the description of the blog. If I define it as:

</p>
<p class="whiteboxsmall">
This is a <b>firstBelowCalendar nugget</b>. Isn't it good?
</p>

then the text appears in its own box below the description box.

I put the extra </p> in because, looking at the page source on the server, the <p>s seem to outnumber the </p>s. I'm not sure if it matters or not, browsers are sometimes tolerant to this kind of thing.

Nuggets may contain either raw HTML or macros (i.e. Cheetah tokens) but Structured Text is not handled.

Python Desktop Server converts the nugget html into a small JavaScript file that is uploaded to the server and puts a link to the JavaScript into the rendered html web page. When the browser downloads and displays the html, it downloads the piece of JavaScript and renders it in place. The mechanism would allow the nugget to be redefined without having to render all the web pages again.

Using the Preview link to look at the results, sometimes you cannot see changes. Pressing the browser Refresh button may help or, if desperate, flushing it's cache. I use Mozilla 1.6 and it sometimes seems reluctant to reload .CSS files and apperently javascript snippets.

last change 2004-05-23 17:14:56

A blog documenting Peter's dabblings with Python, Debian Linux and any other cool toys he comes across.

XML-Image Letterimage

© 2004, Peter Wilkinson