(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: source.ml,v 1.5 2006/03/28 16:24:08 rich Exp $
+ * $Id: source.ml,v 1.8 2006/12/06 09:46:57 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
with
Not_found ->
error ~title:"Page not found"
- dbh hostid q "That page was not found";
+ r dbh hostid q "That page was not found";
return () in
(* XXX CSS - eventually both title and CSS fields should be returned in
(* Now write out the sections. *)
if model.redirect = None then
List.iteri
- (fun i (sectionname, divname, content) ->
+ (fun i (sectionname, divname, divclass, jsgo, content) ->
write "Section-Id" (string_of_int i);
(match sectionname with None -> () | Some sectionname ->
write "Section-Header" sectionname);
(match divname with None -> () | Some divname ->
write "Css-Id" divname);
+ (match divclass with None -> () | Some divclass ->
+ write "Css-Class" divclass);
+ (match jsgo with None -> () | Some jsgo ->
+ write "Javascript-Onclick" jsgo);
write "Content" content;
ignore (print_newline r)) model.contents_