Manage New Drupal Site
Manage New Drupal Site is very important so that our drupal site will have a good structure and have a must have modules. In this article, we assume that we just install new drupal site. So we have to develope it from zero. Drupal is very powerful content management system.
Once we install a new drupal site, check the status and address it accordingly. Here I have a reference to handle common error for new drupal site. It is adviseable to settle any error before we proceed to create any node.
Before create any content / node, it's better practice to install the compulsaory module first..
1) Install the compulsory contribute modules
Compulsory here mean the most used modules in drupal site. Other than that, it must install modules that suite your need. It it mean, some modules compulsory to me but not to others..it's base to your need.
Admin tollbar
Pathauto
Turn automatically node titte to url
Pathologic
Node Order
To change the taxonomy term order
Simple XML Sitemap
- Once intall & activate the module, it'll automatic create the sitemap
- To see the sitemap - Configuration - Search and Metadata - Simple XML Sitema - Status - Default
Real-time SEO for Drupal
External Links
Linkit
Link: https://www.drupal.org/project/linkit
After install go to configuration/content authoring/text format and editors/full HTML
Linkit : Linkit profile: Default
Enable the Linkit plugin by check box the Linkit URL converter
Editor Advanced Link
This module will enable Open in new window (<a target="_blank">) and other attributes
Link: https://www.drupal.org/project/editor_advanced_link
After install go to configuration/content authoring/text format and editors/full HTML
Advance Link: Check the box the Enabled attributes
Check the "Limit allowed HTML tags and correct faulty HTML"
Webform
Webform is one of the most important module, especiually if you want to have 'order form' in your drupal site.
After we install the webform, we need to install some external libraries to work together with webform module. Those libraries have to put under libraries folder like this: web/libraries
New drupal site do not have a libraries folder - so we have to manually create it first - create it under Web (web/libraries)
After that, copy the library below and paste it to web/libraries
External libraries:-
Code Mirror 5.65.12 (CDN)
jQuery: Input Mask 5.0.8 (CDN)
jQuery: International Telephone Input 17.0.19 (CDN)
jQuery: RateIt 1.1.5 (CDN)
jQuery: Select2 4.0.13 (CDN)
jQuery: Text Counter 0.9.1 (CDN)
jQuery: Timepicker 1.14.0 (CDN)
Popper.js 2.11.6 (CDN)
Progress Tracker 2.0.7 (CDN)
Signature Pad 2.3.0 (CDN)
SVG Pan & Zoom 3.6.1 (CDN)
Tabby 12.0.3 (CDN)
Tippy.js 6.3.7 (CDN)
How to add webform to content type
1) Structure > Content Type > Manage fields > Re-use an existing filed > Webform > Under operation: click re-use > Save setting
2) Reaarange webfirm field - eg: put under body field
3) After that - when we create a new node - we can see the Webform field
Honeypot
This module is one of the way on how to protect drupal form from attack
Link: https://www.jomgitravel.com/web/admin/config/content/honeypot
Configure:
* Check this: Protect all forms with Honeypot
Taxonomy menu
If you need to use taxonomy menu - for example for sidebar menu, the taxonomy menu is very helpful
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
Statistic
Link: https://www.drupal.org/project/statistics
2) Activated the Core Module
Not all core mudule was activated by default, so we have to enable it base on our need.
2.1) Layout Builder
This module is not compulsory, but if you want to display your drupal site diferently from defauld then this module very useful. It can work together with Block & Views.
After activated - go to Structure/Content type/manage Display/check the Layout Builder
3) Other settings
Create the Taxonomy Category
This is very important so that we can arrange node automatically base on category
How to create - Go to..
- Structure
- Taxonomy
- Add Vocabolary: Eg: Category
- Add terms for catagory..
To enable the Category taxonomy in content type..
Go to: structure/content type/manage fields/create a new field/reference/taxonomy term..
Now, we have an option for category for our node..
When we create a taxonomy & terms, we can use it in main menu & all node automatically arrange by category
Note: If you want to create Taxonomy Menu - reffer the Tanonomy Menu above for detail
Image management
- Structure
- Content Tyoe
- Manage Field
- Image
- Edit
- File directory: default is [date:custom:Y]-[date:custom:m]
We can change to something like: Article (for article content type) - We can change other setting as per our preference
4) Other consideration
4.1) Did we need comment field ?
It is depend to our preference and our need. If comment field is compulsory to you, then you can use it. But be aware of spam. By default, drupal was enable the comment field. So, if you do not want it you have to disable. If you need the comment field, you must install the protection module like Honeypot or other option modules.
4.2) Did we need Forum field ?
Forum module not activated automaticall by default. So you have to manually active it if you want. But bare in mind this type of content will prone to spam. So if you drupal site no need for forum, it is better not to use it. . If you need the forum field, you must install the protection module like Honeypot or other option modules.
4.3) User permission
Drupal site have many user level like Anonymous, Authenticated, Content editor & Administrator. We also can create other user level base on our need. By default, drupal user permission setting is secure. So carefully if you want to adjust it!
client = ca-pub-2898279488603899
slot = 9058461004
format = auto