Advanced Components
  • Welcome
  • Start here
    • Setup
    • Dependencies
  • Getting Started
    • Front-end tooling
    • Create a new D9 theme
    • Component Architecture
    • Drupal Best Practices
    • Drupal Attributes
    • Twig Blocks
  • Basic Components
    • Global styles
    • Adding webfonts
    • Heading Component
      • Improving the Heading
    • Button Component
  • A component's lifecycle
    • Hero Component
    • Include statements
    • Drupal prep
    • Drupal entities
    • Homepage content type
    • View modes
    • Add Hero to homepage
    • Drupal cache & twig debugging
    • Twig template suggestions
    • Getting field values
    • Integrating the Hero
    • Drupal Libraries
    • Hero Image styles
  • Card component
    • Card Component
    • Component Variants
    • Card Variant
    • Author component
  • Drupal site building
    • Blog articles
    • View modes
    • Drupal Views
    • Author
    • Generate content
    • Adding Blog Lists to the Homepage
  • Drupal Integrations
    • Integrating the Card
      • Taxonomy terms
    • Integrating the Card Wide
    • Author integration
    • From our blog
    • Integrating From our blog
    • Featured Content
    • Integrating Featured Content
    • Blog image styles
    • Blog detail page
  • Extras
    • Image Styles
    • Navigation
  • Resources
    • Resources
Powered by GitBook
On this page
  • Exercise: Create Taxonomy terms and users
  • Generate blog posts
  • Promote blog posts to homepage

Was this helpful?

  1. Drupal site building

Generate content

Since we will need blog posts to display on our homepage, let's create a few of them using the Devel Generate module. This module creates all kinds of content for us using lorem ipsum text. In addition to blog posts, we will also need to create a few user accounts and some taxonomy terms. Let's start

Exercise: Create Taxonomy terms and users

  1. Enable the Devel Generate module by going to the module's page in Drupal (Extend option from admin toolbar)

  2. Search for Devel and you will see Devel Generate. Check the box next to it and click Install

  3. From Drupal's admin toolbar click Configuration > Development > Generate Terms

  4. Accept the defaults and click the Generate button

  5. Repeat steps 3 & 4, but this time for Users

Generate blog posts

  1. From Drupal's admin toolbar click Configuration > Development > Generate content

  2. Under Content type check **Blog ** then click Generate

  3. Be sure none of the blog posts are promoted to the frontpage.

We should now have plenty of blog posts to use. Some values in our content may be need to be tweaked as some content may be too long for our purpose.

Promote blog posts to homepage

Pick two blog posts, edit them and choose Promote to the frontpage from the Promotion Options tag in the node edit page.

PreviousAuthorNextAdding Blog Lists to the Homepage

Last updated 4 years ago

Was this helpful?