I have explored the swiki architecture a bit and done the following in order
to add the references at the bottom of the rendered pages of the generated
static web site.
Is this the way it should be done? Any comment?
Thanks,
  Jerome.

-------------------------------------------------
---- In swiki/refs/actions/meta.xml, add a line :

<file id="174" type="page" name="renderReferences" category="rendering" />

----------------------------------------------------------------------------
-----
---- Creation of swiki/refs/actions/174, copied from 10, with some
modifications:

book references: page before: [:results | (book formatBookAction: 'bar'
request: request response: response shelf: shelf), String crlf, '<h3>Liens',
((results size > 1) ifTrue: ['s'] ifFalse: ['']), ' vers cette page</h3>',
String crlf, '<ul>', String crlf] during: [:element | '<li><a href="',
(request referenceShelf: shelf page: element), '.html">', element showName,
'</a>', String crlf] after: [:results | '</ul>', String crlf] ifAbsent: ['']

-----------------------------------------------------
---- Modification of swiki/refs/templates/29, adding:

<p>
<?renderReferences?>
</p>

at the end of the page body.

-------------------------------------------------------------------
---- In the Smalltalk code, adding a method (needed by action/174):

Swiki-Commanche::HttpSwikiRequest::references::
referenceShelf: shelf page: thePage 
        ^ thePage id asString

Reply via email to