Version 0.99.5
This is a preliminary version of the documentation. Help us to improve it by filling tickets. We are looking for native english speakers to proof read the documentation. Contact us!
module Eliomducetools:Predefined boxes for Eliomsig..end
type('a, 'b)one_page =(unit, unit, 'a, [ `WithoutSuffix ], unit, unit, 'b) Eliomservices.service
val menu : ?classe:string list ->
([< Eliomservices.get_service_kind ], [< Eliomservices.registrable ])
one_page * Eliomduce.Blocks.a_content_elt_list ->
(([< Eliomservices.get_service_kind ], [< Eliomservices.registrable ])
one_page * Eliomduce.Blocks.a_content_elt_list)
list ->
service:([< Eliomservices.get_service_kind ], [< Eliomservices.registrable ])
one_page ->
sp:Eliomsessions.server_params -> Xhtml1_strict.ulExample:
menu ~classe:["mainmenu"] [ (home, <:xmllist< Home >>); (infos, <:xmllist< More infos >>) ] current sp
type ('a, 'b, 'c) hierarchical_site_item = | | Disabled |
| | Site_tree of |
type ('a, 'b, 'c) main_page = | | Main_page of |
| | Default_page of |
| | Not_clickable |
type('a, 'b, 'c)hierarchical_site =('a, 'b, 'c) main_page *
('c * ('a, 'b, 'c) hierarchical_site_item) list
The difference between Main_page, Default_page and Not_clickable is a bit subtle:
Main_page is when you want to create a main page for your subsite. All the subpages are subsections of that page.Default_page is 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 is when you do not want the menu entry to be a link but you want subpages.hierarchical_site_item. If the latter is Disabled, the menu entry is disabled.val hierarchical_menu_depth_first : ?classe:string list ->
?whole_tree:bool ->
([< Eliomservices.get_service_kind ] as 'a,
[< Eliomservices.registrable ] as 'b, Eliomduce.Blocks.a_content_elt_list)
hierarchical_site ->
service:('a, 'b) one_page ->
sp:Eliomsessions.server_params -> Xhtml1_strict.ul listhierarchical_menu_depth_first menu constructs a function taking as parameters a service and ~sp (server parameters) and displaying a hierarchical menu for this service. The menu is constructed by exploring the tree using a depth-first algorithm. It means that the first menu item will be displayed, followed by the whole sub-menu for this item, then the second menu item with its sub-menu, and so on. By default, only the sub-menus corresponding to the current page are displayed. If you want all the sub-menus to be displayed, specify ?whole_tree=true.
val hierarchical_menu_breadth_first : ?classe:string list ->
([< Eliomservices.get_service_kind ] as 'a,
[< Eliomservices.registrable ] as 'b, Eliomduce.Blocks.a_content_elt_list)
hierarchical_site ->
service:('a, 'b) one_page ->
sp:Eliomsessions.server_params -> Xhtml1_strict.ul listhierarchical_menu_breadth_first menu constructs a function taking as parameters a service and ~sp (server parameters) and displaying a hierarchical menu for this service. The menu is constructed by exploring the tree using a breadth_first algorithm. It means that the whole menu for one level will be displayed, followed by all sub-menus. Only the sub-menu corresponding to the current page is displayed.
val structure_links : ([< Eliomservices.get_service_kind ] as 'a,
[< Eliomservices.registrable ] as 'b, Eliomduce.Blocks.a_content_elt_list)
hierarchical_site ->
service:('a, 'b) one_page ->
sp:Eliomsessions.server_params -> Xhtml1_strict.link list<link rel="subsection" ...> and <link rev="subsection" ...> for the given hierarchical site.