How is a subject defined?

  • code: There is a config which defines the name of the subject in the database, which types of taxonomy are allowed and which types of content are allowed for this subject:
  • database: If you are visiting learning content of a subject, the first part of the URL is definded for this subject in the database.
  • URL and taxonomy: The second and following parts of the URL are defined by the title of the taxonomy elements and by the title of the learning content**taxonomy/taxonomy/Article
  • subject-name: It is always shown on the right side of the logo and creates this "Serlo Subject" term. It comes from the "lable" of the navigation element on the highest level. This works because every element of the subject (pages and taxonomy) have sub-elements of this first navigation element in the navigation backend. And that's why the visible subject name can be different from the subject url (e.g. "sustainability" in the URL and "Applied Sustainability" as subject name)
  • navigation
  • the navigation element with the type "subject" has to match the subject name in the code/database (unverified assumption from Simon and Benni)
  • every subject needs this huge navigation element in the backend to load the taxonomy for this subject.
  • the subject "slug" of the taxonomy navigation element has to match the subject URL, that is saved in the database.

How to create a new subject

Please follow this order:

  1. write config in the code
  2. create a static page as your future subject home page (to reserve the url)
  3. create subject in taxonomy (be sure, your changes in the config are live)
  4. create navigation