1. Twig Debugging
One of my primary tools for Drupal 8 theming is Twig debugging so you’ll definitely want to enable this while building out a theme and site. Chapter Three wrote a great post on enabling Twig debugging so I won’t rehash that here how to get it up and running.
Twig’s debug output will really come in handy for printing out:
- Theme hook names
- All possible suggested template names
- Existing templates being used
- The full path of the current template in use
After you write your own theme hook, those new template names will also show up in the debug output.
Sample output from Twig debugging
2. Devel Kint
Kint, part of the Devel module for Drupal 8 is awesome for inspecting arrays that contain your entity info, field names, view modes, and more. Kint is similar to Devel Krumo but for Drupal 8. If you really want to dig in with theming, Kint will be invaluable, especially for writing custom preprocess functions, creating variables, and theme hooks.
3. Search Kint
Search Kint for Drupal 8 is similar to Search Krumo for Drupal 7. It extends Kint by giving you two additional functions that are huge time savers. The first is a search box and select list to search any arrays on the page. The second function is a “get path” box where you can easily copy an array path. This takes the guess work out of things, especially since Kint provides much more info than what we were used to in Krumo.
4. Drupal Console
Drupal Console is fast becoming one of my new favorites. This is an amazing tool which can perform dozens of Drupal 8 tasks efficiently in Terminal. I’m just getting started with Console but I really like it already. Console can import / export config, clear cache, generate module / theme scaffolding, generate entities, create nodes, and much more. There’s even has a “learning” mode as well as some auto-complete functionality. So it does a lot of what Drush does but it goes beyond with much needed and added functionality. At this point, I am pretty sure I will be switching over to using Drupal Console instead of Drush.
Just a few sample commands available out of dozens in Drupal Console
5. Drupal Template Helper
There is also now a Google Chrome plugin called Drupal Template Helper which moves all the your Twig debug output to a Chrome web inspector tab. This makes your main HTML inspection area a lot cleaner and easier to scroll through. I even got this extension running in Opera which has been my browser of choice lately for web development. Note, I’ve been using Opera for theming for a few reasons. It’s built upon Webkit so it’s the same familiar Web Inspector UI as Chrome that you’re used to. Opera also seems faster, less buggy, and less bloated than Chrome.
Read More 4501
Read More 4502
Read More 4503
Read More 4504
Read More 4505
Read More 4506
Read More 4507
Read More 4508
Read More 4509
Read More 4510
Read More 4511
Read More 4512
Read More 4513
Read More 4514
Read More 4515
Read More 4516
Read More 4517
Read More 4518
Read More 4519
Read More 4520
Read More 4521
Read More 4522
Read More 4523
Read More 4524
Read More 4525
Read More 4526
Read More 4527
Read More 4528
Read More 4529
Read More 4530
Read More 4531
Read More 4532
Read More 4533
Read More 4534
Read More 4535
Read More 4536
Read More 4537
Read More 4538
Read More 4539
Read More 4540
Read More 4541
Read More 4542
Read More 4543
Read More 4544
Read More 4545
Read More 4546
Read More 4547
Read More 4548
Read More 4549
Read More 4550
Read More 4551
Read More 4552
Read More 4553
Read More 4554
Read More 4555
Read More 4556
Read More 4557
Read More 4558
Read More 4559
Read More 4560
Read More 4561
Read More 4562
Read More 4563
Read More 4564
Read More 4565
Read More 4566
Read More 4567
Read More 4568
Read More 4569
Read More 4570
Read More 4571
Read More 4572
Read More 4573
Read More 4574
Read More 4575
Read More 4576
Read More 4577
Read More 4578
Read More 4579
Read More 4580
Read More 4581
Read More 4582
Read More 4583
Read More 4584
Read More 4585
Read More 4586
Read More 4587
Read More 4588
Read More 4589
Read More 4590
Read More 4591
Read More 4592
Read More 4593
Read More 4594
Read More 4595
Read More 4596
Read More 4597
Read More 4598
Read More 4599
Read More 4600
Read More 4601
Read More 4602
Read More 4603
Read More 4604
Read More 4605
Read More 4606
Read More 4607
Read More 4608
Read More 4609
Read More 4610
Read More 4611
Read More 4612
Read More 4613
Read More 4614
Read More 4615
Read More 4616
Read More 4617
Read More 4618
Read More 4619
Read More 4620
Read More 4621
Read More 4622
Read More 4623
Read More 4624
Read More 4625
Read More 4626
Read More 4627
Read More 4628
Read More 4629
Read More 4630
Read More 4631
Read More 4632
Read More 4633
Read More 4634
Read More 4635
Read More 4636
Read More 4637
Read More 4638
Read More 4639
Read More 4640
Read More 4641
Read More 4642
Read More 4643
Read More 4644
Read More 4645
Read More 4646
Read More 4647
Read More 4648
Read More 4649
Read More 4650
Read More 4651
Read More 4652
Read More 4653
Read More 4654
Read More 4655
Read More 4656
Read More 4657
Read More 4658
Read More 4659
Read More 4660
Read More 4661
Read More 4662
Read More 4663
Read More 4664
Read More 4665
Read More 4666
Read More 4667
Read More 4668
Read More 4669
Read More 4670
Read More 4671
Read More 4672
Read More 4673
Read More 4674
Read More 4675
Read More 4676
Read More 4677
Read More 4678
Read More 4679
Read More 4680
Read More 4681
Read More 4682
Read More 4683
Read More 4684
Read More 4685
Read More 4686
Read More 4687
Read More 4688
Read More 4689
Read More 4690
Read More 4691
Read More 4692
Read More 4693
Read More 4694
Read More 4695
Read More 4696
Read More 4697
Read More 4698
Read More 4699
Read More 4700
Read More 4701
Read More 4702
Read More 4703
Read More 4704
Read More 4705
Read More 4706
Read More 4707
Read More 4708
Read More 4709
Read More 4710
Read More 4711
Read More 4712
Read More 4713
Read More 4714
Read More 4715
Read More 4716
Read More 4717
Read More 4718
Read More 4719
Read More 4720
Read More 4721
Read More 4722
Read More 4723
Read More 4724
Read More 4725
Read More 4726
Read More 4727
Read More 4728
Read More 4729
Read More 4730
Read More 4731
Read More 4732
Read More 4733
Read More 4734
Read More 4735
Read More 4736
Read More 4737
Read More 4738
Read More 4739
Read More 4740
Read More 4741
Read More 4742
Read More 4743
Read More 4744
Read More 4745
Read More 4746
Read More 4747
Read More 4748
Read More 4749
Read More 4750
Read More 4751
Read More 4752
Read More 4753
Read More 4754
Read More 4755
Read More 4756
Read More 4757
Read More 4758
Read More 4759
Read More 4760
Read More 4761
Read More 4762
Read More 4763
Read More 4764
Read More 4765
Read More 4766
Read More 4767
Read More 4768
Read More 4769
Read More 4770
Read More 4771
Read More 4772
Read More 4773
Read More 4774
Read More 4775
Read More 4776
Read More 4777
Read More 4778
Read More 4779
Read More 4780
Read More 4781
Read More 4782
Read More 4783
Read More 4784
Read More 4785
Read More 4786
Read More 4787
Read More 4788
Read More 4789
Read More 4790
Read More 4791
Read More 4792
Read More 4793
Read More 4794
Read More 4795
Read More 4796
Read More 4797
Read More 4798
Read More 4799
Read More 4800
Read More 4801
Read More 4802
Read More 4803
Read More 4804
Read More 4805
Read More 4806
Read More 4807
Read More 4808
Read More 4809
Read More 4810
Read More 4811
Read More 4812
Read More 4813
Read More 4814
Read More 4815
Read More 4816
Read More 4817
Read More 4818
Read More 4819
Read More 4820
Read More 4821
Read More 4822
Read More 4823
Read More 4824
Read More 4825
Read More 4826
Read More 4827
Read More 4828
Read More 4829
Read More 4830
Read More 4831
Read More 4832
Read More 4833
Read More 4834
Read More 4835
Read More 4836
Read More 4837
Read More 4838
Read More 4839
Read More 4840
Read More 4841
Read More 4842
Read More 4843
Read More 4844
Read More 4845
Read More 4846
Read More 4847
Read More 4848
Read More 4849
Read More 4850
Read More 4851
Read More 4852
Read More 4853
Read More 4854
Read More 4855
Read More 4856
Read More 4857
Read More 4858
Read More 4859
Read More 4860
Read More 4861
Read More 4862
Read More 4863
Read More 4864
Read More 4865
Read More 4866
Read More 4867
Read More 4868
Read More 4869
Read More 4870