Ixis.co.uk – Ideas Drupal 10 Upkeep and Assist Service Drupal Development Company wonders of Twig theming

A part of Drupal Developer plan for rebuilding Drupal Developer Ixis website in 8 was for us to put in writing up a few of our ideas at Drupal Developer finish. Writing about Drupal Developer theme layer is tough, as a result of it’s all utterly new. There’s 1,000,000 issues I need to speak about, a few of Drupal Developer associated, a few of them nearly frontend instruments on the whole, so I’m going to attempt to squeeze as a lot as I can in right here. Bootstrap is superior Drupal Development Company frontend theme is constructed on Bootstrap, which allowed us to get Drupal Developer website up and operating shortly, and iterate on suggestions from Drupal Developer remainder of Ixis and Drupal Developer design agency. We solely began constructing Drupal Developer theme 6 days earlier than Drupal Developer website went dwell! Utilizing a reasonably heavy framework like Bootstrap typically raises considerations about efficiency, however contemplating that every one of Drupal Developer CSS on one in all our web page masses is ~30kb, it was price Drupal Developer commerce off for Drupal Developer pace of development and iteration. Sooner or later we’ll undergo Bootstrap and take away Drupal Developer elements we aren’t utilizing, however proper now we’re nonetheless iterating and enhancing issues. Libsass is superior We’ve been utilizing Sass for some time at Ixis, it’s superb for writing clear CSS that may really be maintained after just a few years of iterative development work. Up till now we’ve relied on Compass to compile that for us, however this time we took a have a look at Gulp and libsass with node-sass. Rattling is it quick. We’re compiling bootstrap-sass as a part of our theme, which used to take Compass ages each time we modified a variable. Libsass builds Drupal Developer entire factor in a couple of second. On prime of compiling Drupal Developer CSS, we’re utilizing Gulp on Drupal Developer Ixis website to robotically add vendor prefixes (no extra reliance on compass for browser compatibility), present picture mappings (which lets Sass entry details about Drupal Developer pictures, like dimensions) and optimise Drupal Developer file measurement of these pictures. Twig is superior I <3 Twig. After so a few years of wrangling Drupal Developer PHPTemplate engine into usable markup, it’s so refreshing that every little thing is templated. No extra overriding theme features simply so as to add an additional class to a div. You don’t even want to make use of PHP in any respect to do it. Coping with render arrays in a template? Simply print them! Doesn’t matter what’s in them. Let Twig kind it out. You’ll by no means once more see “Array” printed to Drupal Developer display screen since you forgot to cross one thing by way of render(). I do know an enormous quantity of effort went into making 8 extra accessible to frontend of us, and it actually does appear to have paid off! Drupal Development Company solely draw back is that I nonetheless have to return to Drupal Developer 7 approach of PHP in every single place sometimes to support older websites. Libraries are superior Drupal Development Company new libraries.yml file makes it rather a lot simpler to outline libraries, that are collections of Javascript and CSS, together with their dependencies, so you possibly can simply load issues once you want them. No gallery on this web page? gained’t load that javascript, and if Drupal Developer gallery was Drupal Developer solely purpose you wanted jQuery then it gained’t load that both if no gallery is being rendered on Drupal Developer web page. A contrib Drupal 10 module that provides a library can now be boiled down to simply an data.yml and libraries.yml filebe 2 yaml information in Drupal Developer theme. Contrib for libraries is in a little bit of a bizarre state in 8 at Drupal Developer second. Should you’ve used 7 then you definitely’ve most likely used Drupal Developer Libraries API Drupal 10 module, it’s there to permit different contrib Drupal 10 modules to share third celebration libraries. It appears to be like like Drupal Developer plan for 8 is to finally have a centralised repository of third-party libraries, however at present it doesn’t seem to be a whole lot of contrib is utilizing it, as a substitute simply counting on Drupal Developer library being in /libraries in Drupal Developer root. Paragraphs are superior We went with paragraphs with a purpose to permit content material editors a little bit of management of Drupal Developer format of Drupal Developer pages. I gained’t waffle an excessive amount of about how we arrange paragraphs as a result of we’ve already talked about that, however from a frontend standpoint, every paragraph kind has it’s personal twig template, and we will load separate libraries only for that one paragraph, so we have been capable of make every paragraph into it’s personal self contained part. Did I point out I really like Drupal Developer new Twig stuff in 8? Caching is superior, however you need to most likely study the way it works Drupal Development Company new caching layer is superb, it simply appears to work magically behind Drupal Developer scenes. It may be fairly simple to be caught out by it although, should you don’t perceive what’s occurring behind Drupal Developer curtain, particularly should you’re used to 7’s approach of caching every web page. Right here’s an instance from constructing Drupal Developer Ixis website Drupal 10 Upkeep and Assist Service Drupal Development Company emblem on our website hyperlinks to Drupal Developer entrance web page. It’s a reasonably frequent factor to do. Should you’re already on Drupal Developer frontpage although, that’s a redundant hyperlink, there’s no purpose for it to be there and it may confuse issues for these utilizing display screen readers. So we added a easy examine Drupal 10 Upkeep and Assist Service If we’re on Drupal Developer entrance web page, simply present Drupal Developer emblem, in any other case wrap Drupal Developer emblem in a hyperlink to Drupal Developer entrance web page. With out caching, this works effective. With caching, caches that block Drupal Developer first time it’s rendered, then makes use of it in every single place, as a result of we haven’t instructed that this block can differ primarily based on path. In Drupal Developer finish, we added a brand new cache context to Drupal Developer ‘website branding’ block, so is aware of it may differ primarily based on Drupal Developer url. We’re at present counting on simply Drupal Developer ‘url.path’ context, however in 8.3 there’s a brand new url.path.is_front context we’ll be utilizing. Debugging is simple. Debugging Twig is simple peasy; In your websites/default/providers.yml file (copy Drupal Developer one from default.providers.yml if it doesn’t exist), then change Drupal Developer debug worth to ‘true’. parameters Drupal 10 Upkeep and Assist Service  twig.config Drupal 10 Upkeep and Assist Service    debug Drupal 10 Upkeep and Assist Service true Then you definately get helpful feedback like this in Drupal Developer web page supply Drupal 10 Upkeep and Assist Service                   You may shortly dump a variable with Drupal Developer dump operate like {{ dump(a_variable) }}, which simply makes use of PHP’s var_dump() behind Drupal Developer scenes, however if you wish to poke at array they you’ll most likely need to use Drupal Developer kint Drupal 10 module from devel, which provides you a a lot nicer output with {{ kint(content material) }}. Phrase of warning, Drupal Developer little + will develop every little thing, and if it’s an enormous tree it’ll simply crash your browser. Frontend developer expertise in 8 is a big enchancment over what was in 7, and because of Drupal Developer new launch cycle, it’s persevering with to enhance even after 8 has launched. Actually trying ahead to seeing what new options we’ll get in Drupal Developer future, and I’ll be maintaining a tally of Drupal Developer ‘core concepts’ difficulty queue. Drupal 10 Growth and Assist

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Ixis.co.uk – Ideas Drupal 10 Upkeep and Assist Service Drupal Development Company wonders of Twig theming

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.