Drupal make teaser with photo beside news
To create a teaser with a photo beside the news in Drupal, you can use the following steps:
Step 1: Create a new content type
- Go to Structure > Content types
- Click on "Add content type"
- Enter a name and description for your content type (e.g. "News with Photo")
- Set the "Type" to "Article"
- Click "Save"
Step 2: Add a field for the photo
- Go to Structure > Fields
- Click on "Add field"
- Enter a name and description for the field (e.g. "Photo")
- Set the "Field type" to "Image"
- Set the "Widget" to "Image upload"
- Click "Save"
Step 3: Add a field for the teaser
- Go to Structure > Fields
- Click on "Add field"
- Enter a name and description for the field (e.g. "Teaser")
- Set the "Field type" to "Text"
- Set the "Widget" to "Text field"
- Click "Save"
Step 4: Configure the teaser field
- Go to Structure > Fields > Teaser
- Click on the "Formatter" tab
- Select "Summary" as the formatter
- Set the "Summary length" to the desired number of characters (e.g. 150)
- Click "Save"
Step 5: Configure the photo field
- Go to Structure > Fields > Photo
- Click on the "Formatter" tab
- Select "Image" as the formatter
- Set the "Image style" to the desired style (e.g. "Thumbnail")
- Click "Save"
Step 6: Create a new view
- Go to Structure > Views
- Click on "Add view"
- Enter a name and description for the view (e.g. "News with Photo")
- Set the "View type" to "Page"
- Click "Save"
Step 7: Add fields to the view
- Go to Structure > Views > News with Photo > Fields
- Click on "Add field"
- Select the "Teaser" field
- Click "Add"
- Click on "Add field" again
- Select the "Photo" field
- Click "Add"
Step 8: Configure the view layout
- Go to Structure > Views > News with Photo > Layout
- Select the "Teaser" field as the "Primary field"
- Select the "Photo" field as the "Secondary field"
- Set the "Layout" to "Side-by-side"
- Click "Save"
Step 9: Add a display
- Go to Structure > Views > News with Photo > Displays
- Click on "Add display"
- Select "Page" as the display type
- Click "Save"
Step 10: Configure the display
- Go to Structure > Views > News with Photo > Displays > Page
- Select the "Teaser" field as the "Primary field"
- Select the "Photo" field as the "Secondary field"
- Set the "Layout" to "Side-by-side"
- Click "Save"
That's it! You should now have a view that displays a teaser with a photo beside the news.