Compulsory modules
Compulsory modules
Node export
This module allows users to export nodes and then import it into another Drupal installation, or on the same site.
Using this module you can save yourself a lot of time setting up new websites that have similar nodes to websites you've already made, migrating nodes to new Drupal versions, or between development/staging/production sites.
You will need the same content types for the imports to work (unless using Feeds to import), and ideally relevant compatibility with fields, and modules.
How to use Node export
Through a tab that appears on the node page.
How to use Node import
Using the form at Node import under Create content (Add content)
Admin toolbar
Real-time SEO for Drupal
Simple XML sitemap
Step 1
- Structure
- Content type & select the content type
- Edit
- Go to Simple sitemap XML
- Default - check the Index entities of type Article in sitemap Default
- Check Regenerate all sitemaps after hitting Save
- Save
- Note: Do the same to the other content type (if you want to generate sitemap for them)
Step 2
- Configuration
- Search and metadata
- Simple XML Sitemap
- Status - Default - click it to see the sitemap generated
- Setting - set as your preference
- Save
Read more:
- https://dev.acquia.com/tutorial/beginners-guide-installing-simple-xml-sitemap-module-drupal
- Defining your sitemap.xml base URL
Google Analytics + google taq
Google Analytic Report + Chart
Metataq
- Go to Structure/Content Type/Article (for example)
- Manage field
- Create a new field
- Meta Taqs
- Create a label
- ...
Backup and Migrate
Redirect
Pathauto
Step
- Configuration
- Search and metadata
- Url aliases
- Patern
- Add patautho pattern
- Under patern type - Select Content
- Path pattern - [node:title]
- Check all the content type
- For label - can type 'General patern / up to you
Add another for taxonomy
- Do the same thing as above
- Patern type - [term:name]
- Check the vocabolory - ex: Category (or leave uncheck to allow any)
- For label - we can write 'Taxonomy patern'
- Save
Bulk generate
- If we install & setting this module and we have a note before - click the Bulk Generate
Pathologic
Imce
using existing image
Linkit
easily link internal
Webform
To instal the webform library, using this method (with composer)
The Webform module comes shipped with a "composer.libraries.json" file containing information about all up-to-date libraries required by the module itself, and so we will be using this file to install all libraries by merging the "composer.libraries.json" with the "composer.json" file of our Drupal website.
1) Composer Merge plugin
The merging is accomplished by the aid of the Composer Merge Plugin plugin available on GitHub, so from the project directory, open a terminal and run:
composer require wikimedia/composer-merge-plugin
2) Merge the composer.libraries.json file
You have these two alternative options:
2.a) Using the file provided by the module
Edit the "composer.json" file of your website and under the "extra": { section add:
* note: the `web` represents the folder where drupal lives like: ex. `docroot`.
"merge-plugin": {
"include": [
"web/modules/contrib/webform/composer.libraries.json"
]
},
Look Like This:
From now on, every time the "composer.json" file is updated, it will also read the content of "composer.libraries.json" file located at web/modules/contrib/webform/ and update accordingly.
2.b) Use drush to append webform libraries in a custom file
Generate a custom file according to options set in webform libraries config page running:
drush webform:libraries:composer > DRUPAL_ROOT/composer.libraries.json
Edit the "composer.json" file of your website and under the "extra": { section add:
"merge-plugin": {
"include": [
"composer.libraries.json"
]
},
From now on, every time the "composer.json" file is updated, it will also read the content of "composer.libraries.json" file and update accordingly.
But in this case you need to update this file after dependencies updates or config changes in your webform libraries config page by running again:
drush webform:libraries:composer > DRUPAL_ROOT/composer.libraries.json
3) Install libraries
You have these two alternative options:
3.a) As a CDN
In order for the "composer.json" file to install all the libraries mentioned as a CDN inside the "composer.libraries.json", from a terminal, run composer update --lock .
This method will assure that all the libraries will be served from CDN and automatically updated once the "composer.libraries.json" is updated with new versions of the Webform module.
Notice that this update ALL your dependencies, not just the webform libraries. If you prefer just load the webform libraries, go for 3.b instead.
3.b) As local files
If you want to install all the mentioned libraries in a local directory on your webserver, typically web/libraries, then you need to run
composer update drupal/webform "drupal/webform-*" --with-dependencies
This method will ensure that composer will pull the libraries from the CDN source and store a copy in your libraries directory in your Drupal installation.
Read more
This 2 library show error: popperjs, tippyjs
Warning: file_get_contents(libraries/tippyjs/dist/tippy.umd.js): Failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 39 of C:\xampp\htdocs\drupal10-5\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
Warning: file_get_contents(libraries/popperjs/dist/umd/popper.js): Failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 39 of C:\xampp\htdocs\drupal10-5\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
What I do is:
- Go to Sturcture/Webform/Configuration/Libraries
- Disable that 2 library
- When disable - report status not show the error enymore
Menu firstchild
Node Order
At glance, we may thingking that Node Order module is to make the node oderable. Because the module name is Node. But it is actually to make orderable for taxonomy vocabulary. That mean, if you do not have or not create the taxonomy vocabulary, then this module cannot make it job. Taxonomy vocabulary is very useful so that we can class the node into category.
So, node order module give ability for user to reorder or rearrange the node within taxonomy vocabulary.
By default, taxonomy will arrange the node by node creating date - that mean the recently posted nodes will come first. For certain reason, we need to rearrange the node so that the node look more structure and organized. So, for that - node order module have a gread job.
Note: To make sure Node Order running - please setting the Pathauto & create alias
How to setting the Node Order menu
1) Select the taxonomy vocabulary
- Configuration > Content Authring > Node Order
- Under vocabularis - check 'Category' (note: 'category' is an example of your taxonomy vocabulary)
- Save
2) Set the 'Orderable' in Taxonomy
- Structure > Taxonomy
- Select the Vocabolary name - eg: Category
- Under Operations - select Edit vocabolary
- Under Node Order - check Orderable box
- Save
3) Configure View (Tanonomy Term)
Please make an atention for this step, because if we not making this setting - the taxonomy vocabulary will not orderable.
- Structure > Views > Taxonomy Term
- Sort creteria
- Add
- Search for Nodeorder
Taxonomy Menu (optional)
In this example, we want to create Sidebar Menu for Sidebar
1) Prior to this, we have to create Taxonomy Vocabulary
Structure
Taxonomy
Add Vocabulary - Eg: Sub-category
Add term to Vocabulary - Eg: Promotion, Joint Trip, etc
2) Create blank menu
Structure
Menu
Add Menu
Give name: Eg Sidebar menu
Save
3) Add taxonomy menu
Structure
Taxonomy menu
Add taxonomy menu
Label - Eg: Sidebar menu
Vocabulary - Sub category (this is what we create earlier in taxonomy)
Menu - Sidebar menu
Check box for all menus entries expend
4) Put the menu in block
Structure
Go to Sidebar Left / Sidebar Right
Place the Sidebar menu to the sidebar block
5) Add Sidebar menu taxonomy to Content type
Structure
Content type & choose the content type
Select Referance
Label: Sidebar menu
Type of item to reference: Taxonomy term
Uncheck the Required field
Vocabulary: select Sub-category
Rearrange the Sidebar menu field
6) Create node
put to Sidebar menu Term
Now Sidebar menu automatically display the menu
Easy Breadcrumb
The Easy Breadcrumb module updates the core Breadcrumb block to include the current page title in the breadcrumbs. It comes with settings that are common features needed in crumbs.
Breadcrumbs use the current URL (path alias) and the current page title to build the crumbs. The module is designed to work with no adjustments and it has settings to customize the crumbs.
Example
URL: /gallery/videos/kittens
Breadcrumbs: Home >> Gallery >> Videos >> Cute Kittens
Activate this core modules
Layout Builder & Layout Discovery
- Structure
- Content type & select the content type
- Manage Display
- Check the Use Layout Builder & Allow each content item to have its layout customized
- Save
Cdeditor plugin
Another module consider to install:-
1) For page view ~ can choose any one suite to your need. This module very important to check the node perfomence.
- Exclude Node Title
- Visitor ~ to Logs visits and provides reports and charts.
- Google Analytics Reports ~ provides graphical reporting of your site's tracking data
- Google Analytics ~ web statistics tracking system to your website
- Matomo Analytics ~ web statistics tracking system to your website
- Counter ~ counts how many visitors on your website. This module provides real time counting. All data saved to database.
- Statistics Counter ~ extends Drupal's core statistics module by adding node counts for week, month and year
2) Manage / trim the body summary
- Smart Trim ~ requirement Token, Token Filter, Token
https://www.webwash.net/trim-text-fields-summaries-smart-trim-in-drupal/
client = ca-pub-2898279488603899
slot = 9058461004
format = auto