Ok, now we can create events, except that we cannot show them to our customers!
We will see that the layout can be prepared and packaged in the extension in order to provide the best integration for customers.
The following steps show how to declare layouts:
Create the
[extension_path]/view/frontend/layout/events_index_index.xml
file and add the following code:<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="content"> <block class="Blackbird\TicketBlaster\Block\EventList" name="event.list" template="Blackbird_TicketBlaster::list.phtml" /> </referenceContainer> </body> </page>
Create the
[extension_path]/view/frontend/layout/events_view_index...