Menu API Views¶
ShowMenuViewSet¶
-
class
djangocms_restapi.menu.views.
ShowMenuViewSet
(*args, **kwargs)[source]¶ API Endpoint which calls the
{% show_menu %}
tag and returns a serialized list ofNavigationNodes
.The following query parameters will be used to construct the argument list which will be passed to the template tag.
Query parameters Description start_level (int): Specify from which level the navigation should be rendered. end_level (int): Specify from which level the navigation should stop rendering. extra_inactive (int): Specifies how many levels of navigation should be displayed
if a node is not a direct ancestor or descendant of the current
active node.
extra_active (int): Specifies how many levels of descendants of the currently
active node that should be displayed.
namespace (str): The namespace of the menu. If blank, all namespaces will be used. current_page (str): URL for the page that should be considered the current_page
when rendering the context.
ShowMenuBelowIdViewSet¶
-
class
djangocms_restapi.menu.views.
ShowMenuBelowIdViewSet
(*args, **kwargs)[source]¶ API Endpoint which calls the
{% show_menu_below_id %}
tag and returns a serialized list ofNavigationNodes
.The following query parameters will be used to construct the argument list which will be passed to the template tag.
Query parameters Description root_id (str): Specify the ID of the root node. start_level (int): Specify from which level the navigation should be rendered. end_level (int): Specify from which level the navigation should stop rendering. extra_inactive (int): Specifies how many levels of navigation should be displayed
if a node is not a direct ancestor or descendant of the current
active node.
extra_active (int): Specifies how many levels of descendants of the currently active
node that should be displayed.
namespace (str): The namespace of the menu. If blank, all namespaces will be used. current_page (str): URL for the page that should be considered the current_page
when rendering the context.
ShowSubMenuViewSet¶
-
class
djangocms_restapi.menu.views.
ShowSubMenuViewSet
(*args, **kwargs)[source]¶ API Endpoint which calls the
{% show_sub_menu %}
tag and returns a serialized list ofNavigationNodes
.The following query parameters will be used to construct the argument list which will be passed to the template tag.
Query parameters Description levels (int): Specify how many levels deep the sub menu should be rendered. root_level (int): Specifies at what level (if any) the sub menu should have its root. nephews (int): Specifies how many levels of nephews (children of siblings) that
should be displayed.
current_page (str): URL for the page that should be considered the current_page
when rendering the context.
ShowBreadcrumbViewSet¶
-
class
djangocms_restapi.menu.views.
ShowBreadcrumbViewSet
(*args, **kwargs)[source]¶ API Endpoint which calls the
{% show_breadcrumb %}
tag and returns a serialized list ofNavigationNodes
.The following query parameters will be used to construct the argument list which will be passed to the template tag.
Query parameters Description start_level (int): After which level should the breadcrumb start? 0
equals home.only_visible (int): Numeric boolean value(0 = False, 1 = True). To include all
pages, use
only_visible=0
.current_page (str): URL for the page that should be considered the current_page
when rendering the context.