230 Modules match your search

Extend and customize Drupal functionality with contributed modules. If a module doesn't quite do what you want it to do, if you find a bug or have a suggestion, then join forces and help the module maintainer. Or, share your own by starting a new module.

Slick extras

Drupal Slick carousel

Provides Slick carousel samples and extra utilities demonstrating various usages of Slick carousel. The provided samples are forward-compatible with next Slick versions.

Examples for Developers


Follow the Examples project on Twitter: https://twitter.com/DrupalExamples

Code Examples For Drupal

The Examples for Developers project aims to provide high-quality, well-documented API examples for a broad range of Drupal core functionality.

Model Entities

model-entity1.jpg

The objective of this module is to provide a model entity and entity administration interface to kick-start your entity development.

While entities in Drupal 7 are a very useful abstraction and can be great tool for suitable projects there are some challenges facing developers wanting to use them:

a. Identifying what is a suitable project for entities.
b. Figuring out what is “best practice” when it comes to entity development and quickly getting up to speed with working code.
c. Effectively integrating entities with Drupal core and modules that are entity-aware and can give you extra functionality for free.

These challenges are partially being met by:

a. The Entity API module covering a lot of the ground that the Core Entity API does not (and then some) and doing a lot of the heavy lifting when it comes to integrating with the rest of Drupal core and modules.
b. Real-life examples (Profile2, Drupal Commerce, Message) which illustrate just how entities can be used in real scenarios.

Nevertheless, putting it all together for your own specific needs is still not simple and identifying “best practice” way of doing that is not clear.

featured news feature

Sample with created news

Here is an example of how to build a list of featured elements on top of a paged listing.

Featured elements are not displayed on the paged listing.

Term condition

This module provides a simple Condition plugin which checks to see if the current node has a specific taxonomy term. Not particularly useful on its own, but works wonders in combination with Block Visibility Groups if you're looking to display different blocks based on a node's taxonomy categorization.

Commerce Examples

This project aims to provide simple, educational examples of the programming APIs used in Drupal Commerce.

Right now there are examples of:

  • Adding additional checkout panes
  • Adding additional checkout pages
  • Adding a custom line item
  • Adding order states and statuses
  • Programmatically inserting products
  • Programmatically adding to the cart
  • Creating orders

On the agenda:

Bootstrap Slider

Bootstrap Slider module for Drupal by More than (just) Themes.

Views Examples

Views Examples Settings Page

A collection of views examples that can be turned on and used directly within views. You can use the views examples as-is on your site, or you can clone them and use them as a starting point for further customized views.

Although this module works, it will likely be rewritten as a features package in the future.

How to Use

  1. Enable views and views_examples modules.
  2. Go to views_examples settings page: /admin/settings/views_examples
  3. Turn on the examples you would like to try out. Some examples require additional modules which are noted. You won't be able to enable those examples until the required modules are enabled.
  4. Go to views build page: /admin/build/views. The enabled examples will be shown.
  5. Click "clone" for any example you want to edit. This is not strictly necessary (you can simply edit the example view itself) but, if you clone it instead, you will be left with the original example view for reference.
  6. Edit your cloned version and play around. Preview results of the view at the bottom of the page by choosing the display and then clicking the Preview button.
  7. Have fun!!

Current Views Examples

Most of the examples thus far are fairly simple. One more complicated one is the Similar by Terms example.

    Rules examples

    This project contains example code for Rules 2 plugins:

    * Rules actions (including minimal example, an example with a required parameter, and an action that also provides a parameter)
    * Rules conditions, including using parameters
    * Declaring and invoking Rules events

    The example code does not contain any Rules data types, nor any simple tests. Sorry about that.

    Dummy Content

    Dummy Content (DC) provides an API (hooks) for other modules to generate (& manage) dummy nodes.

    DC allow your custom module to provide demo nodes as soon as the module is installed - this helps with populating blocks, views, and generally showcasing your module's functionality. This is very useful when showcasing a module's functionality to a client. For example, rather than installing the Forum module and having to manually create forum nodes, the DC API can be used to pre-populate the site with forum-type nodes as soon as the Forum module is enabled. Additionally, rather than having purely Lorem Ipsum-type content, you can define relevant pieces of text and images, giving the content a more complete & realistic look & feel.

    DC will also clean up after itself, removing any dummy nodes when child-modules are disabled.

    Requirements

    As of 7.x-1.2, DC requires the Tableform module.

    API

    The included dc_example.module provides an example implementation of the available hooks:

    hook_dummy_content_data():
    - allows you to define 'subjects' of text and image data

    hook_dummy_content():

    REST/JSON

    This module is unsupported due to a security issue the maintainer didn’t fix. See REST JSON - Multiple Vulnerabilities - Highly Critical - Unsupported - SA-CONTRIB-2016-033 for details.

    If you want to use this module, your options are:

    Publish to Apple News

    A bit about Apple's News Platform

    News, Apple’s all new app available with iOS 9, delivers rich and immersive news, magazine, and web content to millions of users. With Apple News Format, publishers can create signature content for News with custom typography, rich photo galleries, video, and fun animations. Content is automatically optimized for both iPhone and iPad and publishers can earn revenue with iAd, Apple’s advertising platform.

    Example Web Scraper

    Web Scraper

    This example demonstrates how to build a Drupal-native web scraper. It imports events from a single month of Stanford University's calendar by navigating to the page for each day and creating a node for each event on the day's list. Each event is then queued for scraping its details.

    All functionality is provided by Feeds, Feeds XPath HTML Parser, Feeds Crawler, Feeds SelfNode Processor, and Feeds Tamper. This module only includes an example configuration packaged using Features. Developers and site-builders who are interested in web scraping may find it a helpful starting point.

    Inline Manual

    Inline Manual Player

    Inline manual is an online tool, making it easy for everyone to create, update and re-use documentation as well as create product/site tours. Documentation is interactive (step by step guides) that can be played and used by any web site/ web application.

    The Drupal module allows to fetch data from InlineManual.com and store them locally. The data can be played using the player afterwards.

    Requirements

    No need to have jQuery Update anymore, player works without jQuery

    Design

    The Design project provides a home for designers and themers working with Drupal.

    Goals

    • Provide actual tools to aid in Drupal theming (but without duplicating other projects).
    • Discuss ideas and agree on best practices on design/theming (with lots of bikeshed and bullshit), possibly turning into guidelines over time.
    • Raise concrete design and theming problems (bugs) in Drupal, and how to solve them.
    • Form a concensus to standardize on certain theme engines, base themes, etc.
    • Compare and conclude on theming approaches, (third-party) software tools, such as image compression, collaboration, etc.
    • Prepare for modern or upcoming design, theming, and usability problem spaces, such as HTML5, and figure out how to handle them in Drupal.

    Overall, a place to share your findings with others. Instead of scratching your own itch, contribute to solve problem spaces that are common for all designers and themers, so everyone can design and deliver better Drupal sites.

    OpenFed views multi-column display

    Allows the user to define the number of columns used to display the content of a view without having an access to the views interface.

    Limitations

    Only tested in the "OpenFed / Fast2web D7" distribution. But should work as a standalone.

    Credits

    Developed by Blue4You sponsored by Fedict.

    Misc ctools plugins

    Miscelanea ctools plugins (pre-alpha state).

    Currently provided plugins:

    • 'By children term' access plugin

    YAML Sandbox

    YAML Sandbox Example

    The YAML Sandbox module provides a textarea at /yaml_sandbox that accepts YAML as input and then parses and displays the resulting PHP data. It uses the Drupal\Component\Serialization\Yaml class do to the parsing and thus provides an accurate representation how your YAML data will be represented in Drupal.

    Beer O'Clock

    Description

    Provides an easy way to produce a page that will simply tell you whether it is beer o'clock yet or not. Beer o'clock can be configured in the administration settings for the site to suit your particular company/workplace.

    This module was collaboratively written by high school students during the Catalyst Academy as a part of the Drupal mentorship. For more details see http://catalyst.net.nz/academy

    Plugin tools

    Overview page for Plugins

    Plugin tools is a small developer/administrator utility which allows you to browse the various plugins provided by different modules. This information is normally hidden in the code layer. The aim is to provide some useful, extra tools to developers and interested maintainers.

    This may be desirable for several reasons:

    • To see which modules are providing plugins
    • To check and debug plugins during development

    The Drupal 7 version of this module works with Chaos Tools plugins. A possible future Drupal 8 version will utilise core plugins.

    Writing compatible plugins

    The aim of Plugin tools is to merely wrap existing plugin paradigms without requiring additions to each plugin, however Plugin tools does expect plugin settings arrays to provide some common keys...

    name
    The machine name of the plugin. Used when another title cant be found
    title
    Used in the Plugin tools UI as the Plugin's title. If not found, 'label', will also be tried, before falling back on the machine name.
    description
    If provided, will be used as the description in the Plugin tools UI

    Using the API

    A module can add a small plugin dictionary to its own configuration screens by using the following:

    <?php
    if (module_exists('plugin_tools')) {

    OOP Examples

    The project provides examples of object-oriented programming (OOP) in Drupal starting from very basic ones. The examples are in sequence: each next example improves the previous one.

    Hopefully they would be useful for moving from Drupal 6.7 to Drupal 8. Moreover OOP concepts are not completely new in Drupal. Although Drupal 6,7 does not make thorough use of the native OOP features of PHP, the Drupal code base and API does reflect some principles found in object-oriented programming and design. For example:

    Development Meta module

    This is a simple meta module. It installs the key tools for building Drupal
    sites. When you disable or uninstall the module it removes the dependencies
    for you too.

    To start using meta_dev you can use one of the following methods:

    Drush Make

    Include the following entry in your drush make file

    ; Include dev tools
    projects[meta_dev][subdir] = "dev"

    Download and Enable with Drush

    Run the following command to download and enable meta_dev and all the
    dependencies:

    Typical Entity Example

    Typical Entity Example module is an educational module which shows how to create
    entities for Drupal in your modules.
    This module contains some sub-modules, and each of these sub-modules implements
    an educational Drupal entity.

    • Typical Entity Example: Typical Entity Example module is a parent module for all its sub-modules and implements the Drupal permissions, used by these sub-modules.
    • Typical Entity Example 1: Typical Entity Example 1 sub-module creates the smallest possible entity with machine name "typical_entity_1". This entity exists in Drupal, but you cannot even create the instances of it.
    • Typical Entity Example 2: Typical Entity Example 2 sub-module creates a minimalistic entity, the instances of which can be created, edited or deleted with Entity Metadata Wrappers.
    • Typical Entity Example 3: Typical Entity Example 3 sub-module creates a small entity, which has some predefined bundles and attached fields.
    • Typical Entity Example 4: Typical Entity Example 4 sub-module creates the entity, the instances of which can be created and edited with a simple user interface.

    BigPipe demo

    Big Pipe demo module, after installing for Bartik.

    See https://www.drupal.org/project/big_pipe.

    This module makes it easy to visualize the impact BigPipe can have for a site. Because it's just a module that provides two blocks, it's very easy/unobtrusive to install on your site, to see what the impact would be of using BigPipe for your site.

    Node Help Text

    This module provides the ability to show help text for each content type created on a site. It Is especially useful for sites with many content types, as it saves the time having to create a help block for each content type.

    Example: if you have a specific content type say "Ride" then it can be configured to display the ride steps for creating a ride to end users.

    Normally sometimes we need to put some Text for each node to help end users, this module provides the ability to do that.

    Pages