+ let branding, brand,
+ has_brand_tagline, brand_tagline,
+ has_brand_description, brand_description =
+ match brand with
+ | None -> false, "", false, "", false, ""
+ | Some brand ->
+ let has_brand_tagline, brand_tagline =
+ match brand_tagline with
+ | None -> false, ""
+ | Some s -> true, s in
+ let has_brand_description, brand_description =
+ match brand_description with
+ | None -> false, ""
+ | Some s -> true, s in
+ true, brand,
+ has_brand_tagline, brand_tagline,
+ has_brand_description, brand_description in
+
+ let has_pagebug, pagebug =
+ match pagebug with
+ | None -> false, ""
+ | Some pagebug -> true, pagebug in
+
+ let search_box = match search_box with Some b -> b | _ -> assert false in
+
+ template#set "theme_css" theme_css;
+ template#set "powered_by_name" powered_by_name;
+ template#set "powered_by_url" powered_by_url;
+ template#conditional "search_box" search_box;
+ template#conditional "branding" branding;
+ template#set "brand" brand;
+ template#conditional "has_brand_tagline" has_brand_tagline;
+ template#set "brand_tagline" brand_tagline;
+ template#conditional "has_brand_description" has_brand_description;
+ template#set "brand_description" brand_description;
+ template#conditional "has_pagebug" has_pagebug;
+ template#set "pagebug" pagebug;
+
+ (* Site menu. *)
+ let rows = PGSQL(dbh)
+ "select url, label, ordering from sitemenu
+ where hostid = hostid order by ordering" in
+
+ let is_homepage =
+ match page with