Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

02 - Add a content block to the homepage #7

Open
wants to merge 1 commit into
base: assignment/01
Choose a base branch
from

Conversation

luca-rath
Copy link
Contributor

@luca-rath luca-rath commented Jul 7, 2020

Add a content block to the homepage

Goal

Currently the content of our homepage consists of a single text editor and therefore lacks the possibility of managing
different kinds of standardized content sections. We want to provide a way to manage content blocks such as image
galleries or quotes to our content manager without having to worry about breaking the layout of our page.

Steps

  • Add a new block with multiply types and the name blocks to the config/templates/pages/homepage.xml file
  • Log into the admin UI with user "admin" and password "admin"
  • Modify the "Homepage" and add some content blocks
  • Render the created blocks in your templates/pages/homepage.html.twig

Hints

Run bin/console sulu:content:types:dump to list all available content types.

More Information

The block content type allows to define an arbitrary amount of block types. Each block type is a composition of
multiple basic content types. After defining a block content type, the content manager is able to create and sort
instances of the configured block types in the Sulu administration interface.

A common use case for the block content type is to group a text editor and a media selection. This allows to couple
the respective text to the selected image and render it in a flexible and responsive way on your website. In contrast,
adding images to a basic text editor makes it harder to adapt the format and placement in your twig template.

Links

@alexander-schranz alexander-schranz added the assignment Pull request for a assignment solution label Sep 23, 2020
@niklasnatter niklasnatter force-pushed the assignment/02 branch 2 times, most recently from d3b0852 to d2641ea Compare September 23, 2020 10:47
@niklasnatter niklasnatter force-pushed the assignment/02 branch 2 times, most recently from 3f7a1d5 to 57392b6 Compare October 23, 2020 15:14
@niklasnatter niklasnatter force-pushed the assignment/02 branch 2 times, most recently from e1b6743 to 61c2dc1 Compare February 16, 2021 14:23
@niklasnatter niklasnatter force-pushed the assignment/02 branch 2 times, most recently from f9b3e0e to fc9d6b7 Compare March 31, 2021 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assignment Pull request for a assignment solution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants