Skip to content or footer

Tutorial: How to Build the Navigation

See here for an overview on the minimal structure of the navigation.

Levels

Default navigation

First level: "Where in Serlo you are" - the information right beside the logoSecond level: Is the first level of the navigation on the left

Example math/home: "math" is on level one and "home" on level two

top-left navigation

"About Serlo, Get Involved!"

footer

Elements on the bottom end of the page

Navigation Elements

The different purposes a navigation element can be used are defined via the parameters, which you can add to an element.

You can build the elements by combining them as in the list below. There is one important rule: Add route always as the last parameter!

Collection of the Different Elements

main element

Hier geht es um die Überpunkte in der Navigation, bei denen man nicht direkt zu einem Inhalt kommt.

  • label: name in navigation

  • uri: #

page

  • label: name in navigation

  • params: no value

  • page: "id"

  • route: page/view

embed icon

select topic

this one is tricky, please contact inyono or arekkas.

select curriculum

Ist kompliziert. Bei Bedarf bitte system administrator arekkas kontaktieren.

edit taxonomy

  • label: name in navigation

  • params: no value

  • term: id of taxonomy (topic or locale or curriculum etc.)

  • route: taxonomy/term/organize

link to taxonomy

  • lable: name in navigation

  • params: no value

  • term: id of taxonomy (topic or locale or curriculum etc.)

  • route: taxonomy/term/get

discussions

  • label: name in navigation

  • params: no value

  • id: id of forum taxonomy

  • route: discussion/discussions/get

new revisions

  • label: name in navigation

  • params: no value

  • subject: name of subject

  • action: unrevised

  • route: subject/entity

trash

  • label: name in navigation

  • params: no value

  • subject: name of subject

  • action: trash-bin

  • route: subject/entity

blog

  • lable: name in navigation

  • route: blog

events

  • lable: name in navigation

  • route: event/history/all

to have a nicer singel-view for object-related event-pages (like: http://de.serlo.org/event/history/object/1855), you can create a sub-site for this navigation element with:

  • visible: false

  • route: event/history/object

link to internal url

  • lable: name in navigation

  • uri: UUID

link to external url

  • lable: name in navigation

  • uri: URL

Parameters

visible: false

don't show an navigation element in the navigation. But the navigation is visileb if an users visits the linked content.

community: true

green background for an navigation element

needsidentity: true

this navigation element is only visible for users who are loged in


This content is licensed under
CC BY-SA 4.0Info