use and use like this: +value:mytoc|mytoc+ :)2012/9/20 Gastón Dall' Oglio <gaston.dalloglio@gmail.com>
Hello.
Look at method PRValueLink>>tocIn: and you see that PRTocRenderer is responsible of it :) Then look at PRTocRenderer>>visitHeader: and you see that 'toc-number' is rendered. Maybe you can inherited PRTocRenderer in PRMyTocRenderer and reimplement that you need.Finally, made your value version:mytocIn: aContext
<value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>^ self lookupStructure: aContext structure do: [ :structure | [ :html |
PRMyTocRenderer new
start: structure
in: html painter
on: html ] ]or add a parameter to the existing #tocIn: method:mytocIn: aContext
<value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>
^ self lookupStructure: aContext structure do: [ :structure | [ :html |(self hasParameter: 'mytoc')ifTrue: [
PRMyTocRenderer new
start: structure
in: html painter
on: html ]ifFalse: [PRTocRenderer new
start: structure
in: html painter
on: html ] ] ]and use like this: +value:toc|mytoc+It seems a lot of work to extend Pier classes, but is simple and allows you to do many things.HTH2012/9/20 Carl Hans <han@biba.uni-bremen.de>
_______________________________________________Dear all,
I’m using PIER 2.0 in order to develop a small webpage. After playing around with it for a while many concepts becomes clear. However there still things I’m struggling with.
One of these issues are the value links: On a page with some text structured by sections (using “!”) I would like to use something like “+value:toc+” to have a kind of menu in order to refer directly to specific sections in the text. The +value:toc+ exactly fulfills my needs but the rendering looks a bit strange: It creates an unordered list with ordered entries. That means I have a list items beginning with a bullet followed by a number before the heading of section appears…
I already tried other constructs such as “children” etc. Can anybody give me an advice how render the “value:toc” without having bullets and numbers at the same. The best solution would be to have neither bullets nor numbers…
Many thanks in advance for your help.
Best wishes
Carl
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki