Quick start for SCSS (SASS) to Drupal using the Sassy module
SASS/SCSS has long become the standard for writing CSS code. If you're not using it yet, it's time to consider switching. You can quickly integrate SCSS in Drupal using the Sassy module—even on shared hosting, since the CSS files will be compiled using a PHP library.
Getting Started
I'm starting with a clean Drupal install and the Zen theme. First, install the Sassy module:
https://www.drupal.org/project/sassy
Sassy requires the Prepro module to handle compilation:
Emmet (Zen Coding) write faster HTML/CSS
Emmet is the renamed Zen Coding project. Emmet allows you to quickly generate HTML lists, blocks with classes and IDs using abbreviations. In addition to HTML, you can also quickly write CSS properties using short syntax. At first it might seem unnecessary to learn a new set of shortcuts, but once you're used to it, coding without Emmet feels inconvenient.
Drupal Features (Drupal Features Management)
Features is a module that allows you to bundle site functionality and transfer it to another site with a single click. The result is a feature that can be installed like any other module. A Feature is a collection of entities that together provide a specific piece of functionality on a site.
Drupal Features News
In this lesson, I’ll show you how to reuse site functionality by copying it using a Feature module. Let’s start with something simple—creating a news feed that includes:
- A "News" menu link to the news page
- A news page
- A news block for the front page
This should be enough to understand how the Features module works.
First, install the required modules:
Drupal features feature module version update
In the previous lesson, we looked at how to create feature modules for Drupal. In this lesson, let’s go over how to update those modules by adding new functionality.
Drupal features and taxonomy
In previous lessons, we created a feature module—first version alpha1, then alpha2. Now we’ll create the next version: alpha3. We'll add a taxonomy vocabulary for news sections, as well as tags for each news item.
We’ll create two taxonomy vocabularies: "News Section" and "Tags".
Setting up your web server
Most websites built with Drupal are hosted on shared hosting, with fewer sites on virtual private servers (VPS) or dedicated servers. You may currently be using shared hosting but considering a move to a server due to site growth or hosting multiple Drupal websites. Let's look at the key differences between shared hosting, VPS, and dedicated servers.
Setting up APC. Caching in php.
!!! Warning !!! Do not use APC if you're running PHP version 5.5 or higher—OPCache replaces APC and is built into PHP.
On March 21, 2013, PHP 5.5 beta 1 was released including Zend OPCache—this strongly suggests that OPCache is the official replacement for APC, as it’s included in the PHP core and must be maintained with every new PHP release.
Description of Drupal modules
In this section I will describe Drupal modules
CCK (Fields API) drupal description
The CCK module allows you to create custom content types with the necessary fields such as text fields, dropdowns, checkboxes, and radio buttons. You can also add custom fields to existing content types.
Integration with Other Modules
block_submit
Prevents multiple form submissions. It uses JavaScript to disable or hide buttons after one click, with an option to show a message instead.