.TH "Eliom_tools" 3o 2014-07-10 OCamldoc "" .SH NAME Eliom_tools \- Helpers for (hierarchical) menu generation in HTML5. .SH Module Module Eliom_tools .SH Documentation .sp Module .BI "Eliom_tools" : .B sig end .sp Helpers for (hierarchical) menu generation in HTML5\&. See the Eliom manual for more information about or \&. .sp .sp .sp .sp .I type .B ('a, [< Eliom_service.registrable ], [< Eliom_registration.non_ocaml_service ]) .I one_page = .B (unit, unit, 'a, [ `WithoutSuffix ], unit, unit, .B [< Eliom_service.registrable ] as 'b, .B [< Eliom_registration.non_ocaml_service ] as 'c) .B Eliom_service.service .sp Restriction of .B Eliom_service\&.service to services without parameters that do not returns a marshalled OCaml value\&. .sp .sp .I type get_page = .B (Eliom_service.get_service_kind, Eliom_service.registrable, .B Eliom_registration.non_ocaml_service) .B one_page .sp Restriction of .B Eliom_service\&.service to registrable GET services without parameters that do not returns a marshalled OCaml value\&. .sp .sp .I type .B ('a, [< Eliom_service.registrable ], 'c) .I hierarchical_site = .B ('a, [< Eliom_service.registrable ] as 'b) main_page * .B ('c * ('a, 'b, 'c) hierarchical_site_item) list .sp Hierarchical sites description\&. This is is a pair .B (main page, .B subpages list) \&. Each subpage is defined by the text to be displayed in menus and a .B Eliom_tools\&.hierarchical_site_item \&. .sp .sp .I type .B ('a, [< Eliom_service.registrable ]) .I main_page = | Main_page .B of .B ('a, [< Eliom_service.registrable ] as 'b, .B Eliom_registration.non_ocaml_service) .B one_page .I " " (* Main page for your subsite: all the subpages are subsections of that page\&. *) | Default_page .B of .B ('a, 'b, Eliom_registration.non_ocaml_service) one_page .I " " (* Like .B Main_page but is not taken into account for computing which is the current page in the menu\&. Use it for example when there is no main page, but you want one of the subpages to be the default page for your subsite\&. The service you use as default page must appear another time in the subtree! *) | Not_clickable (* When you do not want the menu entry to be a link but you want subpages\&. *) .sp Main page description for a section of a hierarchical site\&. .sp .sp .I type .B ('a, [< Eliom_service.registrable ], 'c) .I hierarchical_site_item = | Disabled (* The menu entry is disabled\&. *) | Site_tree .B of .B ('a, [< Eliom_service.registrable ] as 'b, 'c) hierarchical_site .I " " (* The menu entry as a label and subsections\&. *) .sp .sp .I module type HTML5_TOOLS = .B sig end .sp .sp .I module F : .B HTML5_TOOLS .sp Menus with functional node semantics .sp .sp .I module D : .B HTML5_TOOLS .sp Menus with DOM semantics .sp .sp .I val with_js_file : .B string list -> unit .sp Record an (external) JavaScript file to be included in .B Eliom_tools\&.F\&.html \&. .sp .sp .I val with_css_file : .B string list -> unit .sp Record an CSS file to be included in .B Eliom_tools\&.F\&.html \&. .sp .sp .PP .B === .B Other tools .B === .PP .I val wrap_handler : .B (unit -> 'a option Lwt.t) -> .B ('get -> 'post -> 'res Lwt.t) -> .B ('a -> 'get -> 'post -> 'res Lwt.t) -> 'get -> 'post -> 'res Lwt.t .sp This function allows one to wrap a service handler easily depending on whether certain information is available or not\&. .sp The first arguments provides that information ( .B Some value ) of not ( .B None ), the second argument is called just with two arguments when the information is not available (the two arguments are suggesting GET and POST parameters of a request)\&. The third argument is called with that information if available and the parameters\&. .sp .sp .sp