Summary

While we revisited some common theming techniques, we also learned a few new ones. Slowly and methodically dissecting each section of our mockup, we walked through creating Twig templates, and worked with the new Comment field and a lot more to create a fully functional Blog detail page. We definitely covered a lot of material, so let's review everything we covered before moving on to the next chapter:

  • We started by reviewing the Blog Detail mockup to identify key areas of our website that we would need to recreate.
  • We familiarized ourselves with additional node templates and learned how to theme the default display of our Post content type.
  • We dug a little deeper into the new Comment type and learned how to best manage the various Twig templates it provides. This included managing user profile pictures for each comment thread and configuring date and time formats for the comment created date.
  • Finally, we implemented social sharing buttons using our themes octo.libraries.yml file, attaching the Add This library to our Blog detail page, and adding the required markup for our buttons to display properly.

In the next chapter, we will take a look at the new contact forms that are in the Drupal 8 core. We will add a default form to our page that users can interact with, and learn how to add a custom block to a Drupal-generated page. Even more excitingly, we will take a look at adding a Google Maps block to our page that provides a dynamic map with a map marker.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.157.197