Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
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

Exploring folder conventions

In the previous section, we downloaded and installed Pimcore on our PC. Before starting with Pimcore development, it's important to understand how the files are structured inside the filesystem.

Let's start by exploring our filesystem. In the following screenshot, we will see the Pimcore folder expanded:

Figure 2.4 – The Pimcore folders

Figure 2.4 – The Pimcore folders

The Pimcore folder structure is very similar to the Symphony standard. Let's look at the first-level content:

  • bin: This folder contains the executables.
  • config: This folder contains the YAML configuration files.
  • src: This folder contains the source code related to your project.
  • var: This folder contains data saved from Pimcore, such as logs or cache data.
  • vendor: This is the standard folder used by Composer to store application requirements.
  • public: This is your document root.
  • templates: This is the folder that contains all the template files.
  • translations: This is the folder for translation files.

Let's look at these in detail, one by one.

The config folder

This contains all the YAML configuration files and settings. For example, inside /config/local/database.yml, you will find the connection settings for accessing the database. As an additional example, if you want to manage routing, override services, or tune security settings, you can go here and play with the configuration files (the config.yml file is the main configuration file and is usually split into submodules, such as routing.yml, services.yml, and security.yml).

The templates folder

This folder contains the templates. You can have one subdirectory for each bundle. Adding a file into the bundle folder will override the default template file shipped with the bundle. This override mechanism is a standard Symfony feature, and all you need to override a template file is to create a folder inside templates with the name of the bundle and then replicate the folder structure inside the bundle.

The bin folder

This folder contains the binaries. By default, it contains the console executables only, but you can add your own scripts here. The console executables form the program that we use to run maintenance jobs. Adding more jobs to Pimcore won't require you to create multiple executables; you will just need to run a command such as ./bin console <myjobname>. That is why, in most cases, this folder doesn't contain anything more than the console file.

The src folder

Inside the src folder, you will also find the Kernel.php file, which represents your application kernel. The Kernel class is the main entry point of the Symfony application configuration, and as such, is stored in the src/ directory.

The var folder

The var folder is designed to contain all the private Pimcore files and is divided into many subfolders, each one storing a different kind of file. This folder must be writable from the web server.

This folder is composed of the following subfolders:

  • application-logger: Here, Pimcore saves the files from the application logger. The application logger is the system that traces events relevant to the application. Such logs are stored here and can be read from the Pimcore administrative interface.
  • cache: This is the Symfony cache folder. Here you will find all the generated files.
  • classes: This contains files related to classes. In fact, each class definition is stored in many files inside this folder.
  • config: This contains the base settings files that are overridden and extended from the app/config structure.
  • email: This stores the history of sent transactional emails.
  • installer: This relates to the installer kernel. It contains cached data and other information related to the installer.
  • logs: This folder contains the logs from Apache and PHP. It is related to the Docker installation.
  • recyclebin: This contains the data deleted from the user.
  • tmp: Used for temporary file storage, such as for creating dynamic minified JavaScript files.

The vendor folder

This folder is the standard Composer folder, so there isn't any real need to spend more time talking about it. The Pimcore core bundle is stored here just like any other package.

The public folder

This is the document root of your application, and it is exposed to the web. This folder is protected by a .htaccess file and implements some rewriting rules.

This folder is composed of the following subfolders:

  • bundles: You will find a folder for each bundle; each of these subfolders has a symbolic link to the folder inside the bundle (so, /src/bundlename will be visible in /public/bundlename). This is because you can change the files inside the bundle and see the change without any copying or compilation having to take place.
  • var: This contains the uploaded files: images, video files, or simple attachments.

This folder also contains the index.php file, which contains the PHP application where all requests are routed.

In this section, we learned how the folders and files of Pimcore are arranged inside the source code. This was important to cover so that you can use the source code samples without any difficulty. Now you won't be lost in Chapter 4, Creating Documents in Pimcore, when we will need this feature to start a working Pimcore's instance and view the examples shown in this book.

You have been reading a chapter from
Modernizing Enterprise CMS Using Pimcore
Published in: Aug 2021
Publisher: Packt
ISBN-13: 9781801075404
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 $19.99/month. Cancel anytime
Banner background image