As from eZ Publish 3.8 version, you can install extensions through the packages. This system is very useful because you can install your, or third-party extensions in a very simple way through a convenient graphical interface.
From the eZ Publish backend, you can create new packages that can be used in other installations or can be freely distributed through the eZ.no site.
To deliver our extensions and our custom classes (created in Chapter 2), we need to create two types of packages. The first one is the content classes package that will include the definition of our custom classes. The second is an extension package that will include our entire extensions, including the content class package that we previously created.
First of all, we can make a content class package into which we can save the content class definition that we customized in the previous chapters.
The content class package is basically an archive containing all of the enhancement and personalization that we made to the CMF that can be exported to other eZ Publish installations.
To create a content class package, we have to:
http://packtmediaproject/index.php/ezwebin_site_admin
.Our MagazineContentClass package is now ready. We can download it by clicking on the Export to file button and saving the file in an easily-accessible folder.
If we want to add this file to our extension to make our content class definition reusable and easily portable, we have to create a folder named packages
in our extension and then add the downloaded file to this folder.
Open a shell and execute the following commands:
# cd /var/www/packtmediaproject/extension/packtmedia
# mkdir packages
# cp [browser_download_dir]/MagazineContentClass-1.0-1.ezpkg packages/
Now, when we will export our extension, it will include the content class package that we have created.
The .ezpkg
file is a compressed archive. We can uncompress it and see its contents with the tar
command.
The first step to create our package is complete.
13.58.220.83