![]() ![]() The database stores information about concerts, vernissages, and workshops. Imagine a hypothetical situation: using the Basic page content type, several subpages have been created: Concerts, Vernissages, and Workshops. Connecting a Vue.js application to a paragraph The problem When adding paragraphs, the editor can change their order by moving them around using the drag&drop feature. We will place the gallery paragraph in the Article content type and create a custom template for it. As you can guess, the Gallery will be the wrapper for the Gallery Elements. To do this, we will create two types of paragraphs: a Gallery and a Gallery Element. We will create a gallery that consists of elements containing an image, title, text, and a link (external or internal). So let's follow a simple guide on how to take advantage of paragraphs in Drupal 9. Guide for creating paragraphs in Drupal for developers You can define various types of paragraphs that can easily be used by non-programmers working in content management. The paragraphs can be made of components with content, images, multi-column layouts, sliders, video, and audio players, maps, forms, and applications (created, for example, in Vue.js or using another technology). Then, you do not need to create the same field structures in different places in the project, for example, in several content types. If the same structure is needed in two or more content types or blocks (e.g., a logotype module and a link), you can simply create one paragraph type that incorporates both fields (logotype and link) and have the ability to place it wherever you wish to. ![]() Paragraphs also provide modularity, which eliminates the repetition of structural elements and code blocks in a project. Such a solution is considerably more user-friendly than adding code embedded in the source code of a WYSIWYG editor. In this way, the editor can have even more control over the final look and layout of the content. The user can select, for example, the paragraph's display mode depending on the subpage on which he is creating or editing the selected paragraph. With paragraphs, it is possible to create fields that are not necessarily prepared to display content, images, or media but are used as configuration fields. The editor only fills in the fields, and the content will be displayed as intended. ![]() In contrast, paragraphs that have been configured once are "self-sufficient". However, this requires programming skills or programmers support. Modifying the source code in a WYSIWYG editor can help. More problems occur on smaller screen resolutions, e.g., in mobile versions. Unfortunately, the WYSIWYG editor does not always allow the added elements to be displayed exactly as the user expect. Without it, editors repeatedly create content in the WYSIWYG editor that includes text, images, videos, and more. With paragraphs, it is possible to bring a lot of order to the content creation process in Drupal CMS. We will explain crucial aspects of paragraphs later. Paragraphs also allow you to carry out a variety of actions, such as the previously mentioned creation of a custom template for a paragraph type, handling translations, and much more. Prepared paragraph type can be used many times over. Once the configuration is set, all that remains is styling and (optionally) creating a custom template. The paragraph configuration is not complicated: in a few clicks, you can create a paragraph type and add the relevant fields. If the paragraph type is prepared appropriately (including styling) they will not experience any issues. Editors do not have to worry about whether the content looks how they expect or whether they will encounter problems when using the website's mobile version. Using paragraphs is simple and intuitive. What are the advantages of using paragraphs? Simplicity Furthermore, he can manage it to the full extent. Each paragraph type must be configured by the user, which is pretty intuitive – the user has control over which fields a paragraph type should consist of. The Paragraphs module does not come with default paragraph types. The editor, who creates or edits the content, will be able to add any number of paragraphs from the available types and change their order according to preferences. Then add a Paragraph type field in the content type or block, and select which paragraph types should be available in the field. To use paragraphs, you have to install the Paragraphs module. ![]() The Paragraphs module allows you to prepare functional elements (paragraphs) that can be used to build subpages in Drupal-based webistes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |