Display¶
FlaskBB exposes a handful of helpers for building dynamic content to be rendered into templates.
Navigation¶
- class flaskbb.display.navigation.NavigationContentType(*values)[source]¶
Content type enum for navigation items.
- link = 0¶
- external_link = 1¶
- header = 2¶
- divider = 3¶
- tree = 4¶
- class flaskbb.display.navigation.NavigationItem[source]¶
Abstract NavigationItem class. Not meant for use but provides the common interface for navigation items.
- class flaskbb.display.navigation.NavigationLink(endpoint: str, name: str, icon: str = '', active: bool = False, urlforkwargs: dict[str, ~typing.Any]=<factory>)[source]¶
Representation of an internal FlaskBB navigation link:
NavigationLink( endpoint="user.profile", name="{}'s Profile".format(user.username), icon="fa fa-home", active=False, # default urlforkwargs={"username": user.username} )
- class flaskbb.display.navigation.NavigationExternalLink(uri: str, name: str, icon: str = '')[source]¶
Representation of an external navigation link:
NavigationExternalLink( uri="mailto:{}".format(user.email), name="Email {}".format(user.username), icon="fa fa-at" )