happstack-helpers-0.51: Convenience functions for Happstack.Source codeContentsIndex
menuLink :: Request -> (String, String) -> String
menuLink' :: String -> String -> Request -> (String, String) -> String
vMenuOL :: Request -> [(String, String)] -> String
vMenuUL :: Request -> [(String, String)] -> String
hMenuBars :: Request -> [(String, String)] -> String
menuLink :: Request -> (String, String) -> StringSource

Render a link which changes color when the current page is active, modulo css.

menuLink rq (url,anchortext)

similar to simpleLink, outputs an html link. However, menuLink looks at the request to determine if the page being linked to is the current page. If it is, it's in class menuitemSelected, otherwise class menuitem. if the url is blank, the link is unclickable, just displayed gray (e.g., features that haven't been enabled but are coming soon). You need to define the classes described here via css for these features to be useful. I usually do something like in a global css file:

a.menuitem:link {color: blue}

a.menuitem:active {color: blue}

a.menuitem:visited {color: blue}

a.menuitem:hover {color: blue}

a.menuitemSelected:link {color: purple}

a.menuitemSelected:active {color: purple}

a.menuitemSelected:visited {color: purple}

a.menuitemSelected:hover {color: purple}

menuLink' :: String -> String -> Request -> (String, String) -> StringSource
menuLink' classSelected classUnselected rq (url,anchortext) = ...
vMenuOL :: Request -> [(String, String)] -> StringSource
vMenuUL :: Request -> [(String, String)] -> StringSource
hMenuBars :: Request -> [(String, String)] -> StringSource
hMenuBars rq = paintHBars . map (menuLink rq)
Produced by Haddock version 2.6.1