How to generate content and category pages URLs in Drupal?
Why?
To reduce the server load when a visitor navigate through the website we setup a way to generate the URL directly from the content/category page.
How?
The page URL is now generated from 2 fields displayed in Drupal: Parent field and Slug field
Parent field
- In the parent field you choose the parent of the page.
- For this page (https://www.sdworx.co.uk/en-gb/solutions/core-hr/hr-data-management) you would have to select the "Core hr" page as a parent.
- If you leave it empty, the new page will be a child of the homepage.
Slug field
In the slug field, you can fill in the slug of your new page.
- If you fill in the slug yourself, you should also enter the dashes.
- So for this page (https://www.sdworx.co.uk/en-gb/solutions/core-hr/hr-data-management) you should fill in hr-data-management
- If you leave the field empty, Drupal will automatically use the title of the page to fill in the slug field. This happens after saving the page.
Example
For the URL to display https://sdworx-lms-nextjs-be.acc.reference.be/nl-be/opleidingen/opleidingen/sectorale-info it would need to be set as below: