the services present in the container, the updates available for the modules, manage users and their roles. Drupal command The Drupal command automatically generates a database for the majority of your developments To this command is added drush , a historical command provided by the Drupal community before Drupal 8. If this one has duplicate commands with the previous one, it is also complementary to it with additional commands.

In particular, it makes it possible to: refresh Singapore Phone Number List site caches , empty the database or connect to it directly using the site parameters, generate a single sign-on link for any user of the site. Another command in the drush tool also allows you to import or export the configuration of a site . Synchronized configuration between environments The configuration can be easily exported to Drupal.

The CMS offers to easily transpose the database schema, the key / configuration value combinations, the list of installed modules… into YML files . These can be configuration to another installation. Likewise, when creating a module, if it needs a content type or a configuration key, all you have to do is: to export this configuration, and place the linked YAML files in the config / install folder of your module. To manage the configuration more finely, modules exist.

With Drupal 9 Are Provided 2 Tools

They allow you to split the configuration by environment or to ignore certain elements during the import. More flexible tools A clearer and more precise routing system Drupal 9 uses the Symfony component for its routing and manages the routes in YAML format . This system has several advantages over the WordPress URL rewriting system: The route system is much more readable than regular expressions.

Singapore-Phone-Number-List

It is possible to have optional parameters or to force the type of a parameter (or even assign 2 actions to the same route depending on whether the parameter is an integer or not). It is possible to call a URL in the code directly via the name of its route. This makes it possible to change the URLs without any modification in the code, simply by changing its pattern in the YML.

It is possible to route a URL to a controller action, but also to a form class which then directly becomes the content of the page. Drupal routing systemThe Symfony routing system allows you to save your routes in a yml file, more readable and to validate the parameters upstream. Custom fields for content and taxonomies On WordPress, additional fields linked to a content type or a taxonomy are added via a metabox . It is therefore necessary to code the display of the form for the admin, then to manage the submission of this one.

With The Drupal Command

And ensure the integrity of the value of this field in relation to our needs! (WordPress stores all of these fields in a meta table, and it’s impossible to type these base fields more precisely) On Drupal, each field of a content type or taxonomy can be added via the administration . Thus, a field is the sum of several manageable elements: an ID (the machine_name) and a label, the possibility of being a multiple field, the option to make this field mandatory , a type of field (the most common are provided by Drupal, from the textual entry to the relation with another element), a display widget on edit forms . Each type has one or more display formats available for editing.

For example, a date can be displayed with a simple text field, or by separating the day, month and year fields. This makes it easy to administer custom fields , export their configuration, then add the YAMLs created in this way to a module. These elements are thus added during the installation of the module. It is also possible to create your own types of controls and add them via the Drupal plugins system which we will discuss later. Display management is also made easier.

Display of content and its fields In WordPress, always with a view to using custom fields, you have to manage the display of templates . And for the same content type, you have to create a template for each type of display you want (for example, one version for anonymous users and another for logged in users). On Drupal, it is possible to declare for each type of content one or more types of displays , and for each of them an interface that allows you to choose the fields to display and their order.

Leave a Reply

Your email address will not be published.