Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modernizing Enterprise CMS Using Pimcore

You're reading from   Modernizing Enterprise CMS Using Pimcore Discover techniques and best practices for creating custom websites with rich digital experiences

Arrow left icon
Product type Paperback
Published in Aug 2021
Publisher Packt
ISBN-13 9781801075404
Length 412 pages
Edition 1st Edition
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Francesco Minà Francesco Minà
Author Profile Icon Francesco Minà
Francesco Minà
Marco Guiducci Marco Guiducci
Author Profile Icon Marco Guiducci
Marco Guiducci
Daniele Fontani Daniele Fontani
Author Profile Icon Daniele Fontani
Daniele Fontani
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Chapter 1: Introducing Pimcore 2. Chapter 2: Setting Up Your Pimcore Development Environment FREE CHAPTER 3. Chapter 3: Getting Started with Pimcore Admin UI 4. Chapter 4: Creating Documents in Pimcore 5. Chapter 5: Exploring Objects and Classes 6. Chapter 6: Using Digital Asset Management 7. Chapter 7: Administrating Pimcore Sites 8. Chapter 8: Creating Custom CMS Pages 9. Chapter 9: Configuring Entities and Rendering Data 10. Chapter 10: Creating Pimcore Bricks 11. Chapter 11: Finalizing the Website 12. Chapter 12: Implementing Product Information Management 13. Chapter 13: Implementing Master Data Management 14. Chapter 14: Data Integration 15. Other Books You May Enjoy

Implementing a contact form brick

In this example, we will discover how to create an interactive component where the user can insert data. For this purpose, we will create a contact form. The behavior of this widget will be straightforward: we will have a form with a subject, name, message, and clickable button. An email will be sent to a fixed recipient address once the details are filled in and the button is clicked. This example will also introduce a working example of opening the brick's editor to get parameters not shown in the view. Follow these steps to implement the example:

  1. First, create a document with a template and place an areabrick in the editable's template. In the next step, we will have to create the brick.
  2. Create the ContactForm.php file in /bundles/BlogBundle/Document/Areabrick/. The content will be as follows:
    class ContactForm extends AbstractTemplateAreabrick
    {
        public function getName()
        {
    &...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime