---
name: "Eliom_tools.server"
section: "3o"
platform: "linux"
package: "libeliom-ocaml-doc"
version: "4.0.0-2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Eliom_tools.server"
---

# Eliom\_tools.server(3o)

Helpers for (hierarchical) menu generation in HTML5.

## NAME

Eliom\_tools - Helpers for (hierarchical) menu generation in HTML5.

## Module

Module   Eliom\_tools

## Documentation

Module **Eliom\_tools**\
  :  **sig end**

Helpers for (hierarchical) menu generation in HTML5. See the Eliom manual for more information about  or .

*type* **('a, \[\< Eliom\_service.registrable \], \[\< Eliom\_registration.non\_ocaml\_service \])** *one\_page* =  **(unit, unit, 'a, \[ \`WithoutSuffix \], unit, unit,** **\[\< Eliom\_service.registrable \] as 'b,** **\[\< Eliom\_registration.non\_ocaml\_service \] as 'c)** **Eliom\_service.service**

Restriction of  **Eliom\_service.service** to services without parameters that do not returns a marshalled OCaml value.

*type get\_page* =  **(Eliom\_service.get\_service\_kind, Eliom\_service.registrable,** **Eliom\_registration.non\_ocaml\_service)** **one\_page**

Restriction of  **Eliom\_service.service** to registrable GET services without parameters that do not returns a marshalled OCaml value.

*type* **('a, \[\< Eliom\_service.registrable \], 'c)** *hierarchical\_site* =  **('a, \[\< Eliom\_service.registrable \] as 'b) main\_page \*** **('c \* ('a, 'b, 'c) hierarchical\_site\_item) list**

Hierarchical sites description. This is is a pair  **(main page,** **subpages list)** . Each subpage is defined by the text to be displayed in menus and a  **Eliom\_tools.hierarchical\_site\_item** .

*type* **('a, \[\< Eliom\_service.registrable \])** *main\_page* =\
  \| Main\_page **of** **('a, \[\< Eliom\_service.registrable \] as 'b,** **Eliom\_registration.non\_ocaml\_service)** **one\_page**    (\* Main page for your subsite: all the subpages are subsections\
 	of that page. \*)\
  \| Default\_page **of** **('a, 'b, Eliom\_registration.non\_ocaml\_service) one\_page**    (\* Like  **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. \*)

Main page description for a section of a hierarchical site.

*type* **('a, \[\< Eliom\_service.registrable \], 'c)** *hierarchical\_site\_item* =\
  \| Disabled  (\* The menu entry is disabled. \*)\
  \| Site\_tree **of** **('a, \[\< Eliom\_service.registrable \] as 'b, 'c) hierarchical\_site**    (\* The menu entry as a label and subsections. \*)

*module type HTML5\_TOOLS =* **sig end**

*module F :* **HTML5\_TOOLS**

Menus with functional node semantics

*module D :* **HTML5\_TOOLS**

Menus with DOM semantics

*val with\_js\_file* :  **string list -\> unit**

Record an (external) JavaScript file to be included in  **Eliom\_tools.F.html** .

*val with\_css\_file* :  **string list -\> unit**

Record an CSS file to be included in  **Eliom\_tools.F.html** .

**===** **Other tools** **===**

*val wrap\_handler* :  **(unit -\> 'a option Lwt.t) -\>** **('get -\> 'post -\> 'res Lwt.t) -\>** **('a -\> 'get -\> 'post -\> 'res Lwt.t) -\> 'get -\> 'post -\> 'res Lwt.t**

This function allows one to wrap a service handler easily depending on whether certain information is available or not.

The first arguments provides that information ( **Some value** ) of not ( **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.
