Skip to main content

In our earlier article, we had a solid understanding of Drupal 8 theming. In this post, we're going to dig into the theming fundamentals, files for styles, JS, CSS, library, Twig templates , adding new regions, attach the library to all the pages and working with breakpoints in Drupal 8 development.

Creating a Drupal 8 sub-theme

Sub-themes are just like any other theme, with one difference: they inherit the parent theme's resources. There are no limits on the chaining capabilities connecting sub-themes to their parents. A sub-theme can be a child of another sub-theme, and it can be branched and organized however you see fit. This is what gives sub-themes great potential.

To create a sub-theme you define your theme like any other theme and declare the base theme using the "base theme" key. Note that the key has no underscore.

Create an .info.yml file

To create a Drupal 8 theme you need to first create a THEMENAME.info.yml file that provides meta-data about your theme to Drupal. This is similar to how modules and installation profiles are being defined, and as such it is important to set the 'type' key in the .info.yml file to 'theme' in order to differentiate it.

If your theme is named “Flower" then the folder is named “flower/" and the .info.yml file is named "flower/flower.info.yml"

name: Flower
type: theme
description: 'A flower theme that offers extra fluffiness.'
package: Custom
core: 8.x
libraries:
  - flower/globalstyling
stylesheets-remove:
  - '@classy/css/layout.css'
  - core/assets/vendor/normalize-css/normalize.css
regions:
  header: Header
  content: Content
  sidebar_first: 'Sidebar first'
  footer: Footer

Folder Structure

In Drupal 8, we can use the "themes" folder to add a new theme. You should note that Drupal core themes such as Bartik and Seven are located in the core/themes folder of your installation.

The best practice is to place the contributed themes in a sub folder named "contrib" and your own themes in a folder named "custom".

Here are some examples of files and folders that are structured in the new theme folder structure:

 |-flower.breakpoints.yml
 |-flower.info.yml
 |-flower.libraries.yml
 |-flower.theme
 |-config
 |  |-install
 |  |  |-flower.settings.yml
 |  |-schema
 |  |  |-flower.schema.yml
 |-css
 |  |-style.css
 |-js
 |  |-flower.js
 |-images
 |  |-buttons.png
 |-logo.png
 |-screenshot.png
 |-templates
 |  |-maintenance-page.html.twig
 |  |-node.html.twig

Twig in Drupal 8

Twig is a template engine for PHP and it is part of the Symfony2 framework. One of the results of this change is that all of the theme_* functions and PHPTemplate based *.tpl.php files have been replaced in by *.html.twig template files. Learn how to use the twig template engine in Drupal 8.

Adding Regions to a Theme

Adding region meta-data to your flower.info.yml file
- Editing your page.html.twig file and printing the new regions

Declaring any new regions in your flower.info.yml file. Regions are declared as children of the regions key like so:

# Regions
regions:
  header: 'Header'
  content: 'Content'
  footer: 'Footer'

Example:

header: 'Header'
Will become:

{{ page.header }}

In your Twig templates.

Adding (CSS) and JavaScript (JS) to a Drupal 8 theme

In Drupal 8, stylesheets (CSS) and JavaScript (JS) are loaded through the same system for modules (code) and themes.

Defining a library

To define one or more (asset) libraries, add a *.libraries.yml file to your theme folder. (If your theme is named fluffiness, then the file name should be fluffiness.libraries.yml). Each "library" in the file is an entry detailing CSS and JS files (assets)

Defining JS files

cuddly-slider:
  version: 1.x
  css:
    theme:
      css/cuddly-slider.css: {}
  js:
    js/cuddly-slider.js: {}
    dependencies:
    - core/jquery

Defining CSS file

Defining CSS file
  global-styling:
  version: 1.x
  css:
    theme:
      css/layout.css: {}
      css/style.css: {}
      css/colors.css: {}
      css/print.css: { media: print }

Attaching a library file

  • Attaching a library to All page(s)

    To attach a library to all the pages on the site that use your theme, declare it in your theme's *.info.yml file, under the libraries key:

    name: Flower
    type: theme
    core: 8.x
    libraries:
      - flower/cuddly-slider

    You can list as many libraries as you want, all of them will be loaded on every page.

  • Attaching a library to a subset of pages :

    A theme can make this happen by implementing a THEME_preprocess_HOOK() function in the .theme file, replacing "THEME" with the machine name of your theme and "HOOK" by the machine name of the theme hook.

    For instance, if you want to attach JavaScript to the maintenance page, the "HOOK" part is "maintenance_page", and your function would look like this:

    <?php
        function flower_preprocess_maintenance_page(&$variables) {
           $variables['#attached']['library'][] = 'flower/cuddly-slider';
        }
    ?>

Including Default Image Styles With Your Theme

The process for including an image style in your theme is similar to that of including default configuration in a module.

  • Create the Image Style you wish to include using the UI
  • Export the Image Style as YAML
  • Include the exported YAML in the config/install directory of your theme following the appropriate naming convention.
  • Start by creating an image style using the admin UI at Configuration > Image Styles (admin/config/media/image-styles). Once the image style has been created and saved, the configuration that makes up that image style will be stored in your site's active config.

This configuration can be exported using:

  • Single import/export tool at Configuration > Configuration management > Single Import/Export > Export (admin/config/development/configuration/single/export).
  • From the configuration type select list choose "Image style" then choose your image style from the configuration name select list.

Example: flower/config/install/image.style.black_white.yml

langcode: en
status: true
dependencies: {  }
name: black_white
label: 'black & white'
effects:
  8d4f85cc-9a2d-4a30-af15-21b0833dc06d:
    uuid: 8d4f85cc-9a2d-4a30-af15-21b0833dc06d
    id: image_desaturate
    weight: 1
    data: {  }
third_party_settings: {  }

Working with breakpoints in Drupal 8

Breakpoint's properties

  • label - A human readable label for the breakpoint.
  • mediaQuery - Media query text proper all and (min-width: 851px).
  • weight - Positional weight (order) for the breakpoint.
  • multipliers - Supported pixel resolution multipliers.

Example: flower.breakpoints.yml

flower.mobile:
label: mobile
mediaQuery: ''
weight: 2
multipliers:
    - 1x
flower.narrow:
  label: narrow
  mediaQuery: 'all and (min-width: 560px) and (max-width: 850px)'
  weight: 1
  multipliers:
    - 1x
flower.wide:
  label: wide
  mediaQuery: 'all and (min-width: 851px)'
  weight: 0
  multipliers:
    - 1x

I hope this Drupal 8 theming guide illuminates the fundamentals of getting a theme started so that you can use it for Drupal projects.

People are familiar with a Drupal theme and one of the first thing any Drupal developer need to understand how to apply the new tools and techniques to build a Drupal theme from scratch.

Getting started with a Drupal theme

  • Themes allow you to change the look and feel of your Drupal site 
  • Use contributed themes or create a new theme from scratch and share with the community
  • Create a sub-theme of an existing theme. A sub-theme inherits a parent theme's resources

Do more with a Drupal theme

  • Change layouts, regions, images and fonts
  • Hide or display fields dependent on user role
  • Dynamically respond to changes in the content, or to user input
  • Modify or replace text (e.g., labels or attributes) and variables generated by modules
  • Convert any website layout or template into a Drupal theme

Drupal 8 Theming

  • Defining a theme with an .info.yml file
  • Theme folder structure
  • Twig in Drupal 8
  • Adding Regions to a theme
  • Adding stylesheets (CSS) and JavaScript (JS) 
  • Creating a Drupal 8 sub-theme
  • Include default image styles with your theme
  • Use attributes in templates
  • Working with breakpoints in Drupal 8

Theming differences between Drupal 6, 7 & 8

Here are the most noteworthy changes in Drupal 8 that affect theming:

  • Drupal 8 outputs semantic HTML5 markup by default (see Drupal 8 HTML5 Initiative), compared to XHTML in Drupal 6 and 7.
  • Besides jQuery v2.x Drupal 8 now includes more front-end libraries such as  Modernizr, Underscore.js and Backbone.js.
  • Drupal 8's core RDFa  module outputs schema.org markup
  • outputs schema.org markup
  • Drupal 8 has improved accessibility making extensive use of WAI-ARIA attributes.
  • Drupal 8 introduces Twig, which replaces PHPTemplate as the default theme engine. This means the theme_* functions and PHP-based *.tpl.php files have been replaced by *.html.twig templates ()
  • Drupal 8 enables by default features that improve performance such as CSS and JavaScript aggregation.
  • Drupal 8 ships with new UI elements that you use in your own admin screens, including modal dialogs and drop buttons
  • Drupal 8 ships with responsive features such as responsive themes, toolbar, images, and tables
  • In Drupal 6 and 7 if you wanted to add CSS or JS to a particular page, you'd use the drupal_add_css() and drupal_add_js() functions, respectively. This is now replaced byinsert any JS/CSS assets in the #attached property of a render array
  • Drupal 8 drops support for IE 6, 7 and 8, enabling the use of jQuery 2.0 and other code that assumes modern HTML5/CSS3 browser support.
  • Drupal 8 does not support browsers that do not support SVG (including IE8 and Android Browser 2.3)
  • Drupal 8 contains less IDs than Drupal 7's CSS
  • Drupal 8's CSS (file) structure is based on SMACSS & BEM
  • Drupal 8's CSS uses CSS3 pseudo selectors
  • Drupal 8 ships with Classy, a core base theme that injects classes into markup, and includes corresponding CSS. In progress: This will replace many pre-process functions and CSS files which were previously included in core modules
  • Drupal 8 moves CSS classes from pre-process functions to Twig templates
  • Drupal 8 uses breakpoint media queries to control how the site looks on different devices

After you have grasped some basic ideas about your template folder, its files, and the layout of your theme, let's move on to create a Drupal 8 theme in future posts in this series. Join the conversation by commenting below with any questions or feedback on using Drupal 8 theme for your project.
 

Drupal 8 is highly secure, scalable, modular and, most notably, feature-rich and built for high-performance. Drupal’s advantages for running enterprise web sites are well established by such companies as FedEx, The Economist, and The White House. Drupal 8 has 200+ features to integrate in your own site for free.  

Drupal 8 is a great example of continuous quality improvement, with its foundations in the Symfony2 framework. Everything in D8 has been standardized in such a way that maintenance is a lot easier and time-effective.

Install the contrib migrate modules in D8

While migrating a Drupal 8 site, you must install the contributed modules to be configured and run your Drupal migration service. Using your favorite build method, add the following modules to your project which are available in your Drupal 8 core:     

Migrate Plus

Migrate Tools

Migrate Upgrade

After enabling the above mentioned modules we need to visit the /upgrade page. When you do so you will view this screen:

Start_upgradeWe need to click on continue and proceed to configure the migration source (Check the screenshot below). We need to enter the database of the Drupal 7 site and its database credentials as we need to provide the path of your Drupal 7 site's files and press ‘Review Upgrade.’ 

Continue_upgrade

Next_step_in_upgrade

If the provided database credentials are correct, then it show the upgrade review page with the available and missing analysis with list of modules available on the site as shown below:

Next_step_is_here

It will show missing upgrade paths as shown above. You cannot do anything directly on this page to fix these missing migrations. Develop the implementations that are missed while other modules may be excluded on the deployed website.

Next_step_mig

Next_step_mig_1

If you press the ‘perform upgrade’ button, the process will start, depending on the size and types of content/configuration on the source site, the upgrade may take a very long time. It will take long for the user accounts to be imported due to password encryption.

All the feedback and errors are made in the process and while new messages will be displayed on the top, while old messages can be found at the bottom as shown in the image below: 

Next_step_in_solo

However, all of these messages are logged and can be viewed later. Once the upgrade process is finished, you are directed to the site's front page with messages summarizing the results:

After upgrading all the content types, content, taxonomy, static blocks, users are imported from Drupal 7 site to Drupal 8 successfully.

tags_migrate

Migrate_content

 

By using this amazing module all the content types were just re-created by D8 using their structures from D7, at the click of a button!

Content & Content Types 

Content was successfully migrated using the migration tools and techniques. During migration content types were created automatically on D8. All nodes were migrated without leaving out any. Anyone else can replicate most of the field and content type display configuration on the Drupal 8 website.

Block and Site Configuration

I’ve been most surprised with this part. Blocks, Block Configuration, Content type Configuration (Comments etc.), Site-wide configuration (Image Styles) were migrated from the source D7 site to D8 without any effect. 

Taxonomy

Taxonomy is inspiring. There was only one vocabulary. It was replicated on D8 and all terms were auto-migrated.

Images

The Image field was created on the D8 content type automatically by Drupal. The files were fetched and copied from the source site into the D8 sites/default/files folder. An entry was created for each file in the D8 site files table and these files can be managed from “admin/content/files” on the D8 site.

Clean URLs / Aliases 

All the path aliases were migrated from D7 to D8. 

With the help of ‘Migrate’ contributed module, the process of moving a Drupal 7 site to Drupal 8 with regard to content, content types, blocks, taxonomy, users is a lot less painful than I would have anticipated.

Whether you want to upgrade from Drupal 7 to Drupal 8 or altogether migrating from a legacy system to Drupal 8, Anubavam assists enterprises in making a seamless transition to a new CMS. Anubavam's Drupal 8 migration experts can make that happen quickly leveraging the features and functions of Drupal 8 it comes with. In addition to Drupal 8 migrations and upgrades, Anubavam offers a full suite of Drupal development services including design, development, strategy, integration, support and maintenance. 

Drupal is powered by best-of-the-breed technologies which makes Drupal highly customizable and scalable. Drupal is free and open source and supported by an active community of over 1.3 million members from 100,000+ contributing users resulting in more than 37,000+ free plug-in and modules as well as themes which extends its core capabilities. 

Drupal 8 provides built-in security by default and simply bug-free modules aren’t enough to address the security challenges. When your site comes under fire from hackers and spambots, you always need an extra layer of security modules that provide your website better protection against exploitable vulnerabilities.

To that end, we have compiled top rated six essential Drupal modules to better protect your website from security vulnerabilities and other risky elements. This will create a strong security layer around your website, and help Drupal developer keep all sorts of Drupal security issues at bay.

1. Password Policy

The Password Policy module is configured with pre-defined parameters for creating secure passwords after ensuring that certain conditions are validated. With a little quick and easy setting of constraints, this security module can keep that door bolted shut from vulnerabilities.

2. TwoFactor Authentification

This module is increasingly used by site administrators to provide an extra layer of security for accessing your Drupal website by using two-factor authentication with onetime password/PINs delivered on your mobile devices. When the pre-generated codes are successfully entered, access is granted to users. This mechanism protects the user account from attackers.

3. Automated Logouts

This module enables site administrators to create a policy of logging out users after a specified period of inactivity. It is highly customizable by role-based permissions to enforce different timeouts. It can be Automated Logout can be easily integrated with Javascript timers.

4. Security Review

This module performs automated testing for security vulnerabilities against traditional attackers. It does not actually make your site secure and locked down, but runs a series of security checks for arbitrary PHP execution, protection against XSS and a lot more, and provides solutions to fix issues.

5. Username Enumeration Prevention

Attackers can easily find usernames with loopholes in the system to access the Drupal site with username enumeration. Attackers can enter a username that does not exist or use the ‘forgot password form’ to get a confirmation message stating that the auth credentials are invalid. When the attacker persists by trying entering random usernames until the valid username has been found. This module will will make it impossible for the attacker to access the Drupal website. When this module is enabled, the error message will be replaced for the standard unknown username and the user will be redirected back to the login form. If the user does not exist, no password reset email will be sent. The attacker
Can no more exploit the username.

6. Security Kit

This module is reliable, user-friendly and provides Drupal with various security hardening options that can be used in your Drupal site to protect against different web application vulnerabilities. This module promises security for cross-site scripting, cross-site request forgery, clickjacking, and SSL/TLS.

Use these six Drupal modules to get maximum protection to your website from unwanted hackers and attackers. Keep your Drupal site safe and secure with all these modules, we would also recommend you to ensure the perfect dose of Drupal development needs with Anubavam.

Do you want to provide better services to students and faculty and expand your institution globally? Bring your community closer with a right education solution that is designed to help institutions create pre-designed forms & letters, search for course catalog, provide mobile access and boost communication between faculty, students, management, and parents and more. Go through this blog and find major reasons for having a content management system for your college or university!
 
Drupal is one of the most popular content management system across the world and is currently being adopted by massive organizations like the Whitehouse, McDonald’s, The Economist and many others. The key pain points in higher education institutions is its inability to connect and collaborate with its stakeholders. Moreover, it is becoming increasingly difficult to customize website to reflect their brand. Colleges and Universities are moving to Drupal and focused on recruitment and retention of students.  With Drupal development, institutions can achieve huge cost savings and improve productivity. Here’s a list of ten instances why Drupal solution is appealing to higher education institutions:
 
Multi-user content management
 
Drupal has a user-friendly interface that allows students, faculty, management, staff and parents to upload data, share any media and spin up a new site in minutes. 
 
Profiling
 
Students and faculty can create and edit profiles with unlimited custom categories and fields including demographic data, enrollment, schedule and more, and share academic records with administrators.
 
Highly secure
 
Role-based security access to information enable college administrators to control data shared between students, teachers and parents. 
 
Reusable content
 
Providing your institute community with an online and mobile alternative allows students, staff and faculty to create and reuse content through faculty pages, photo gallery, streaming videos, directories, blogs, news, and events. 
 
Customizable
 
Drupal is highly customizable, scalable, flexible, feature-rich and high performance website with unmatched user experience to meet the needs of 21st century education institutions.
 
Automated workflow tools
 
Drupal allows individual users to automate repeat tasks through auto-assignment & approval processes, WYSIWYG form, role-based access control, KPI-based reports, automatic status tracking, notifications, and more.
 
Search engine friendy
 
Drupal allows you to optimize massive amount of content for major search engines such as Google, Bing, and Yahoo and help you to build your brand and improve online reputation.
 
Surveys & feedback forms
 
Create custom forms and fields using Drupal web forms to collect information for registration, faculty/course evaluation, surveys, polls, questionnaire, quizzes, feedback, and more.
 
Mobile accessibility
 
Using mobile-first and responsive design techniques, Drupal offers the best way to deliver website content on different mobile and tablet devices with the least learning curve. Drupal to mobile service provides an easy way to build a multi-platform mobile app for iOS and Android with user-friendly design and native-look alike.        
 
Social media 
 
Drupal makes it easy to integrate all of the social media platforms such as Facebook, Twitter, LinkedIn, Pinterest and more. Students, faculty, staff and alumni can share content and improve their interactions across social channels.  
 
Multilingual support
 
Drupal provides multilingual support and enable education institutions to make available website in multiple languages with good content translation and reach out to overseas students to drive website traffic, increase enrollment and gain competitive edge.  
 
If you need a College Management System designed for the unique complexities of higher education optimized for colleges & universities, then Anubavam offers the right Drupal solution for your institution.  Anubavam is an expert Drupal development company that has built a diverse range of websites and mobile apps for a wide range of global clients and enterprises, ranging from small and large corporations to Fortune 500 companies.
 

Drupal is one of the most popular open source content management system written in PHP and MySQL. Its functionality and usability are far greater than any other system, as it combines ingenuity with simplicity. When you want to build a high performance website, choose Drupal as it is highly flexible and scalable. Complex functionality and dynamic web pages can be developed using many out-of-the box modules provided by Drupal and customized according to your requirements.

Drupal development provides so much, but people make some common mistakes. Avoid these 10 costly mistakes:

1. Wrong folder structure

Using a wrong folder structure and installation of themes and modules at the root levels is a major mistake. Follow the right directory structure to the themes and modules as it will be hard to upgrade and debug.

2. Excessive coding

Avoid excessive coding on the site to implement the required functionality and use the Drupal modules to achieve the goals. Drupal provides core and contributed modules to solve most of the problems. But Drupal developers need to assess the risks associated with the beta or alpha version of modules as they might identify the deficiencies.

3. Hack core files and themes

Hacking the core files and themes makes your site vulnerable to hacking and it becomes almost impossible to apply security updates on your site. So don’t hack core.

4. Wrong module configuration

You must learn about the modules and its interdependencies before you configure and install on your site. Sometimes wrong configurations can lead to bugs or risks of security issues on your site.

5. Inefficient performance

Inefficient performance leads to increase in load time and leaves your site visitors frustrated. Aggregate CSS and Javascript files, configure caching and remove unused modules which will maximize the site performance.

6. Not backing up site

Take backups before making major updates or upgrades to their site. This will restore all your data in case of a major issue during updates or in case of data loss. This will also save precious time.

7. Not W3C-Compliant

Not following the w3c coding standards and guidelines is one of the major mistakes. Following the W3C guidelines ensures error-free and accurate coding.

8. Not implementing security policies

Not providing the suitable roles and permissions on your site can affect your site security. Always ensure that you authorize roles and permissions to users and no one is exploiting your site.

9. No anti-spam control

Always safeguard your site with anti-spam control measures, otherwise your site will be flooded with spam content. So take necessary precautions and enable spam control in comments and content.

10. Not selecting the right hosting service

You have done all the hard work, but selected a wrong host for your site. Your site passes through three different phases - development, deployment, and maintenance. Always use version control system VCS and keep your site (code and modules) up to date and select the right host who can handle spikes in your site traffic.

If you want to create a new website for your business or migrate from your HTML website, it is worthwhile to point out that building a website has become easier and faster using a content management system (CMS). Gone are the days of hard coding with HTML and PHP to create a full featured website. Thanks to the capabilities of open source CMS software, people no more need to break their laptops and log on to their website or blog.

There is an array of content management systems which are developed and backed by a strong community. There are three most common and popular open source CMS platforms for building websites – Drupal, Wordpress and Joomla. They have striking similarities. They are written in PHP programming using MySQL database to manage content, and licensed under free GNU General Public License (GPL). There are a number of themes and modules contributed by the developer communities.

There is not one-size-fits-all approach to choosing the best CMS according to your business goals, budget and requirements. Below is a description of the three top open source CMS tools as a starting point for businesses to choose the right CMS in terms of functionality.

Drupal

Drupal is one of the most successful CMS platforms with a large eco system of modules, themes, templates and supported by a strong community of loyal drupal developers who are always willing to contribute to Drupal. The CMS software is simple, flexible and scalable which leverages an array of tools to organize complex content for developing websites. However, Drupal development needs a high degree of programming knowledge for providing custom features and functionality compared of the all three CMSs. Drupal provides highly dynamic features to create advanced and versatile websites for eCommerce, governments, community, blogs, social networking, education, restaurants, and much more. Drupal is also SEO-friendly and sites built with Drupal ranks high on search engines than Joomla.                         

Wordpress

Wordpress is a blogging platform with innovative and user-friendly features using exquisite themes, templates supported by a comprehensive documentation. The blog software is easy to install and manage a site, which is its strongest point. You can tweak your blog with a wide repertoire of themes, plugins, and widgets. A wordpress developer needs no technical expertise, unlike Drupal. However, the CMS software is known for ease-of-use to build simple blogging and news sites even by non-technical users.

 Joomla

Joomla is sandwiched between Drupal and Wordpress when it comes to user-friendliness, capabilities and developer community support. Joomla offers a middle ground in terms of complexity and ease-of-use with regard to installation and deployment. You can run managing complex sites like blogs, newsletters, and everything using Joomla. It has beautiful themes, templates and extensions that cater to both designers and developers. You can create advanced websites using Joomla with relatively little effort in knowing about the structure.   However, when it comes to providing custom design and features it is complex, more so if you are not familiar with coding and web development.

Conclusion

Using Drupal or Wordress or Joomla - which one is the best? If you are looking to build a simple site for blog or news, Wordpress is the preferred choice and user-friendly for the non-technical wordpress developers. If you need a robust, scalable, secure and a highly customized website, Drupal offers the most complex solutions that you need. Drupal developers are passionate and strongly back the Drupal platform. Joomla also has a dedicated developer community support through forums and even books. It is ideal for an easier learning curve with ready-to-go templates. Still not sure? Please contact us and we can help you decide the right platform for you.

Getting your business started is incredibly challenging. There are several issues you are required to face. Successful businesses grow their business when they learn and adapt themselves to change. Building your business online and sustaining and growing it rapidly is a real challenge.

Drupal is an open source content management framework with an array of features which enable organizations to customize and scale up the Drupal development framework tailored to their specific requirements.  

With Drupal, you need not build your website from scratch. You can build almost anything with Drupal with minimal to no hard-coding. Using Drupal developers you can build a beautiful web app along with a responsive design formatted for multiple mobile platforms. H</a>ere are ten great ways to grow your business and stay competitive:

1. Move Your Database to Drupal

Export your data from the legacy website keeping all the data intact. Import the data from CSV files and build a robust, high-speed, SEO-friendly Drupal website.

2. Marketing Automation

Streamline and automate the entire operational process to help businesses of all sizes to build a CRM on top of Drupal and increase results. Connect your customer with Drupal-based CRM and make an immediate business impact.

3. Deploy Modules & Themes

Assemble ready-to-deploy modules to achieve your vision. Keep the visitors engaged with out-of-the-box themes to enhance credibility and reputation of your brand.

4. Build Mobile-friendly Websites

Make your website responsive to automatically orient itself for multiple screen sizes of iPhone, iPad, and Android phones to access data from anywhere, anytime.

5. Improve Business Productivity & Organizational Excellence  

When your site is maintained properly it could result in unexpected outages or failures. Extend the functionality and maximize performance of your site with automatic data backups, service-oriented architecture, and easy security updates.

6. Enable Multi-Site Installations

Drupal has a fantastic multisite feature which allows you to manage multiple sites and users with single database.

7. Social Collaboration & Online Community Building

Your site visitors get an opportunity to share their favorite posts in social networks including Facebook, Twitter, Instagram, Linkedin, YouTube, and many more.

8. Build a SEO strategy to Stay On Top of Google Rankings

Create a SEO-friendly Drupal site to optimize your site for major search engines and stay ahead of competition. Drupal provides better conversion rate and better visibility to your brand to achieve your business goals easily.

9. Make Your Site for Multiple Languages

Configuring and create successful multilingual sites to enable translation of different versions of the same content in multiple languages.

10. Integrate 3rd Party Applications to Enhance your Site

Enhance the functionality of your site with third party integration to sites and services such as Salesforce.com, Paypal, Quickbooks, Google Apps, etc., and save a lot of time and money for your business.

The upcoming Drupal 8 release provides more than 200 new features and improvements from over 2400 contributors. Drupal 8 development is expected to set new benchmarks for ease of use, responsiveness and faster page loads for high performance. In the meantime, Drupal 8 is currently in the beta stage of the release cycle. We’ll have a look about the routing system in Drupal 7 and then learn how the routing process of Symphony is adopted in Drupal 8.
 
In Drupal, a request is handled on the basis of the path it is recognized and returns to some sort of content. Else, Drupal gives a 404. Drupal maps the URL paths with the relevant page and access callbacks.
 
Drupal 7
 
In Drupal, hook allows you to register paths to access titles, arguments and other requirements.  Drupal 7 modules make use of associated page callbacks to paths in hook_menu().
 
Hook_menu()
Menu links
Breadcrumbs
Contextual links
Title
 
function example_menu() {
  $items['hello'] = array(
    'title' => 'Hello world',
    'page callback' => '_example_page',
    'access callback' => 'user_access',
    'access arguments' => 'access content',
    'type' => MENU_CALLBACK,
  );
  return $items;
}
 
Drupal 8
 
Drupal 8 architecture will feature the routing process of Symfony, which offers much more flexibility and simplicity. Drupal 8 is taking the route of Symfony, which makes it easier for Drupal developers to get started. 
 
In Drupal 8 page callbacks are transformed into responses. The available routes are now configured in a file called{module}. routing.yml?in the module folder. A path will return multiple routes.
 
example.routing.yml
example.hello:
  path: '/hello'
  defaults:
    _content: '\Drupal\example\Controller\Hello::content'
  requirements:
    _permission: 'access content'
'Defaults' keys:
Defines the default properties of a route. Provide one of the following to specify how the output is generated.
_controller
    Drupal 8 provides a method to generate a response.
_content
    If specified, the _controller is set based on the request's mime type, and fills the content of the response with the result of the specified method (usually a string or render array).
_form
    If specified, the _controller is set to HtmlFormController::content, which responds with the specified form. This form must be a fully qualified class name (or service id) that implements FormInterface and usually extends FormBase. Indeed, form building has also become object oriented!
_entity_form
    If specified, the _controller is set to HtmlEntityFormController::content, which responds with the specified entity form (specified as {entity_type}.{add|edit|delete}).
_entity_list
    If specified, the _controller is set to HtmlFormController::content, and _content to EntityListController::listing, which renders a list of entities based on the entity type's list controller.
_entity_view
    If specified, the _controller is set to HtmlFormController::content, and _content to EntityViewController::view, which renders the entity based on the entity type's view controller.
_title
    The title of the page (string).
_title_callback
    The title of the page (method callback).
 
'Requirements' keys:
Determines what conditions must be met in order to grant access to the route.
 
_permission
    The current user must have the specified permission.
_role
    The current user must have the specified role.
_method
    The allowed HTTP methods (GET, POST, etc).
_scheme
    Set to https or http. The request scheme must be the same as the specified scheme. This property is also taken into account when generating URLs (Drupal::url(..)) rather than routing. If set, urls will have this scheme set fixed.
_node_add_access
    A custom access check for adding new nodes of some node type.
_entity_access
    A generic access checker for entities.
_format
    Mime types.
 


At DrupalCon Chicago, while delivering the keynote speech Dries Buytaert said: “If I were to start Drupal from scratch today, I'd build it for mobile experiences first, and desktop experience second.” He believed in it and took the big initiative to build a mobile-friendly CMS. Today most of the mobile features are implemented in Drupal 8. Here different mobile initiatives in Drupal 8 development are outlined:  

1.  Mobile responsive themes

Drupal 8 is built with responsive design with the ability to respond and adjust to multiple screen sizes and browsers. Now there are so many unconventional devices, which has to be kept in mind and designs need to be supportive. So, like Dries visioned it all Drupal 8 themes are built primarily for mobile experience and then desktop.

2. Administrative forms

Mobile-friendly admin toolbar in Drupal 8 stands out. The mobile administrative solution allows users to easily create tasks on mobile devices. The admin toolbar provides the ability to toggle from horizontal to vertical on the screen based on the orientation.

3. Breakpoints

Drupal 8 is built with Breakpoints which will be very useful for the front end developers. Breakpoints are different widths or break points in which the layout and functionality changes.

4. CSS standards

Improving CSS coding standards was the next big thing planned for Drupal 8. It follows SMACSS-style categorization of CSS rules making it more scalable and flexible.

5. Front end performance

The transition from Drupal to Mobile is challenging for front end developers. Front end performance is always business-critical for websites With mobile-first approach, Drupal 8 is built for high performance on all smartphones and tablets. Drupal 8 provides support for HTML5, Javascript and responsive design and optimized for mobile devices to enhance front end performance.

The pace of Drupal 8 development is brisk and the process is nearing completion. It will be a huge step into the mobile world, which has been keenly awaited.

Subscribe to drupal cms
 

start with anubavam today

You have an idea we have engineers to convert your ideas into reality

Request Quote