Skip to main content

Theming Your Site Part 1: Theme Functions and a Twig Primer

  • Chapter
Drupal 8 for Absolute Beginners
  • 1265 Accesses

Abstract

This chapter focuses on the proper way to theme your site, using a markup language called Twig, using theme functions, using theme template files, and using subthemes. Within the pages of this chapter, you’ll take a look at theming the output from a module by using theme functions and a theme template. This chapter also includes an in-depth Twig primer. (Chapter 13 will introduce you to creating a new theme and a subtheme.) Knowing Drupal programming without knowing how to make your web site look good is not going to go over so well with your clients, employer, or end users. Giving users a great-looking site with a great user experience is why theming your site is an important skill set.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 James Barnett

About this chapter

Cite this chapter

Barnett, J. (2015). Theming Your Site Part 1: Theme Functions and a Twig Primer. In: Drupal 8 for Absolute Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6467-5_12

Download citation

Publish with us

Policies and ethics