+ # The page url where the top menu is displayed.
+ #
+ # Used to select the active link.
+ private var current_url: String
+
+ init(current_url: String) do
+ self.current_url = current_url
+ end
+
+ # Add a new link to the menu.
+ fun add_link(content: TplLink) do
+ var is_active = content.href == current_url
+ add_item(content, is_active)
+ end