Overview of the administrative parts of a view.
Hands-On Theming
GuideTheming Cheat Sheet
GuideLearn Drupal
GuideAJAX is one of the main reasons to use a Javascript library such as jQuery. See how simple it is to perform a previously difficult task that required complex browser specific code to preform reliably and was prone to simple mistakes. Implement basic AJAX requests using jQuery's built in methods which make it extremely simple to send an asynchronous request to a server, gather the returned data, and insert it into the page.
Example code:
// AJAX Live Function
$('.content p').live('mouseenter mouseleave',
function() {
$(this).toggleClass('hilight');
}
);
// AJAX Example
$('.node_read_more a').click(function() {
var url = $(this).attr('href');
var link = this;
$.ajax({
url: url,
success: function(data) {
var $fullContent = $('#content-output .content', data);
var html = $fullContent.html();
$(link).closest('div.node').find('div.content').html(html);
$(link).hide();
}
});
return false;
});
In its short history, jQuery has revolutionized front-end web development, making it faster, easier, and more rewarding to write JavaScript – allowing easier selection and manipulation of HTML elements, and ensuring that scripts work across the ever increasing landscape of browsers and operating systems.
Nate Haug and Jeff Robbins show many hands-on examples demonstrating how to use jQuery's simple syntax to choose and manipulate HTML elements, traverse the document object model (DOM), and to attach event handlers which can react to user interaction with the page.
In this video, Jeff and Nate introduce themselves and the agenda for this series, including Selectors, Effects, and AJAX.
When automating the deployment of a Drupal site, it's critical to have a good understanding of the configuration management workflow in order for deployments to be consistent and successful.
Before you can get started synchronizing configuration between instances of your site, you'll need to create a new instance or "clone" of your Drupal site.
By the end of this tutorial, you should know:
- Why it's necessary to clone your site if you want to manage configuration between environments
- How to find your site's universally unique identifier (UUID)
- What to consider when setting up a directory structure for your project
- How to clone a Drupal site
Drupal creates a line of separation between what is content and what is configuration. The line is such that content is stored only in the database, whereas configuration is maintained by the configuration management system. While cached to the database for performance reasons, configuration can be thought of primarily living in the sync directory as a series of flat files.
This sounds like a perfectly clear distinction in theory, but there are several times where interdependencies appear between content and configuration. Understanding the key places where these interface can help prevent confusion and "disappearing" settings due to a lack of understanding.
Modules like Devel or Stage File Proxy offer key advantages when developing locally, but should never be enabled on a production site. This poses a problem for Drupal as which modules are enabled is a configuration. Compounding this problem is the configuration provided by these modules, as well as key configuration that must be set differently locally compared to production.
Fortunately, the Configuration Split module provides a means to accomplish all of these goals. Once set up, configuration can be exported in one or more "splits", enabling you to target different configurations for different environments or situations.
Before we start synchronizing configuration, let's take a look at the default, out-of-the-box file location for staging and synchronizing configuration. Then we'll walk through how to change that directory to a location outside our project's docroot and update settings.php appropriately.
In this tutorial, we'll cover:
- The default location of the configuration sync directory
- How the configuration sync directory is secured
- How to change the location of the sync directory
The configuration system in Drupal was designed to manage and sync configuration between instances of a Drupal site. So before configuration management can be useful, we must have another instance—or clone—of our Drupal site. In this lesson, you will learn:
- Why cloning a Drupal site is necessary in order to manage configuration
- How to clone a Drupal site using tools that have a graphical user interface (GUI)
If you prefer using web-based or GUI tools rather than command line tools such as Drush and Git, then this lesson is for you.