Hi. This seems about right. I'm not sure why you created the referenceShelf:page: method when you could have just written element id asString instead of request referenceShelf: shelf page: element
BTW, you could use the SwikiBrowser to write the code and you wouldn't have to do things like hand edit the meta.xml file. It would also allow you to change code and not have to restart the server. Peace and Luck! Je77 On Tue, Jul 09, 2002 at 07:18:31PM +0200, Desquilbet, Jerome wrote: > 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