I have been debating on switching to Drupal 8. I currently have developed many modules for my customers on Drupal 7 which dynamically build menus and pages based on database data.

My question is how can this be done in Drupal 8? Currently routes and links are added in the .yaml files.

Example: for real estate the user uses a form to enter property details. This data is entered into a custom table. The property is assigned to an agent. This agent or any agent that the property has been assigned has visibility to the property. In my Drupal 7 module the property is dynamically or programmatically added to the content and a link is generated to navigate to the property.

Thanks in advance,

Scott

Comments

codetoils’s picture

Routes and controllers

Drupal's routing system works with the Symfony HTTP Kernel. However, you don't need to know very much about the Symfony HTTP Kernel to do basic route operations. This is how the components relate to each other:

The routing system is responsible for matching paths to controllers, and you define those relations in routes. You can pass on additional information to your controllers in the route. Access checking is integrated as well.

read more at-
https://www.drupal.org/developing/api/8/routing