background preloader

Tutorials and Documentation

Facebook Twitter

Core templates. List of tokens. Last updated October 5, 2013.

List of tokens

Created by VM on March 4, 2009.Edited by drupalshrek, sirtet, octern, erifneerg. Log in to edit this page. The tokens available depends on what modules you have enabled on your Drupal site. To view a list of the currently available tokens on your site, you can navigate to the Help > Token (admin/help/token) page. If the above path is not available on your system be sure that the core help.module is enabled.

In Drupal 7.x, you must have the Token module installed to view the above page, even if you're only using tokens that are in Core. List of the currently available tokens in Drupal 7 List of the currently available tokens in Drupal 6. List of tokens. Last updated October 5, 2013.

List of tokens

Created by VM on March 4, 2009.Edited by drupalshrek, sirtet, octern, erifneerg. Log in to edit this page. The tokens available depends on what modules you have enabled on your Drupal site. To view a list of the currently available tokens on your site, you can navigate to the Help > Token (admin/help/token) page. Core templates. An Introduction to Entities. If you are looking for the documentation or the entity API in Drupal 8, click here.

An Introduction to Entities

Maybe you've heard of "entities" in Drupal 7, wondered what they were, and wanted to learn the underlying concepts. Leveraging the Entity API lets you create more lightweight and flexible solutions. The Drupal community often compares site building through configuration to a favorite childhood toy: LEGO bricks. We can build Entity types, which can make Bundles, to which we can add Fields and then create Entities. This article explains the relationships between Entity types > Bundles > Fields > Entities. The illustration below shows some examples of Entity types included with Drupal 7, with some example entities: Let’s take a closer look at these concepts. Entity types In earlier versions of Drupal, the field system was only used on content types. Nodes (content)CommentsFilesTaxonomy termsTaxonomy vocabulariesUsers You can also build new kinds of entity types where the options above don't suit your needs. Theming Node Forms in Drupal 7.

Here is an example of how to theme the layout of a node form using the theme engine in Drupal 7.

Theming Node Forms in Drupal 7

We will theme the article content type provided by default with Drupal 7. Suppose that the article content type has a taxonomy field field_tags - I want to put the taxonomy field in a separated region called sidebar. Also the form buttons will be extracted and printed as $buttons variable in a separate region. Please note that Node form columns module can be used as an alternative method for this process.

First of all let's implement hook_theme(). Our theme output will be through the template file article-node-form.tpl.php. <? Return array( Drupal 7 Add Node to Organic Group (OG) programmatically. Extending the subscriptions module: node reference subscriptions. Extending the subscriptions module can be very useful if you're feeling a little entrapped by its default capabilities.

Extending the subscriptions module: node reference subscriptions

This is something we dealt with while working on a redesign for JAARS.org. We're still working on the project: look forward to a case study, another blog post, and the completed redesign over the next few weeks. But for now… The subscriptions module provides a framework for notifying users about new content via email. Out of the box, however, it provides only two types of subscriptions: node subscriptions and content type subscriptions. The first thing we do is create a node reference relationship between our subscribe-able node Location and our other node type Story. Next let's define a permission for subscribing to Locations. Now we need to extend the subscriptions module. The first $op we'll deal with is the queue $op, which allows modules to interfere with how subscriptions queues up events (or email alerts) to be processed. That's it!

What's best Drupal deployment strategy. HowTo: Basic Internationalization setup. Note: This article uses the older model of "Content Translation" instead of the newer model of "Entity Translation".

HowTo: Basic Internationalization setup

For a great comparison, see this lullabot article. Introduction Internationalization (or simply i18n) is one of Drupal's most complex module suites. It covers many different multilingual needs - so, in order to make the most of it, you have to know what you're doing. For the beginner Drupal user, building a multilingual site seems quite straightforward, but in fact it represents a challenging task. For instance, have you got 100% of the content in different languages?

Those are interesting use cases. However, this guide is intended for those who can install Drupal, yet still don't know their way around i18n. We'll use two languages, each with its own footer, menu, contact form... and content. Remember: whenever you see example.com, replace it with your actual domain. ;) Requirements In order to complete this tutorial, you must know how to: Modules Basic Optional, but handy Extras.