obj.view: Add a "Related" section

db4
Eduardo Cavazos 2008-08-27 17:10:00 -05:00
parent b02d24aa07
commit d10dc382d3
1 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,7 @@
USING: kernel words namespaces arrays sequences prettyprint help.topics bake
obj obj.print ;
USING: kernel words namespaces arrays sequences prettyprint
help.topics help.markup bake combinators.cleave
obj obj.misc obj.print ;
IN: obj.view
@ -25,7 +26,13 @@ M: obj-type article-content ( type -- content )
M: ptr article-title ( ptr -- title ) [ title -> ] [ unparse ] bi or ;
M: ptr article-content ( ptr -- content ) get { $obj , } bake ;
M: ptr article-content ( ptr -- content )
{
[ get { $obj , } bake ]
[ drop { $heading "Related\n" } ]
[ related { $seq , } bake ]
}
1arr ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!