Book Image

eZ Publish 4: Enterprise Web Sites Step-by-Step

Book Image

eZ Publish 4: Enterprise Web Sites Step-by-Step

Overview of this book

eZ Publish provides developers with a structure to build highly impressive applications and then quickly deploy them into a live environment. eZ Publish is complex, with a steep learning curve, but with the right direction it offers great flexibility and power. What makes eZ Publish special is not the long list of features, but what's going on behind the scenes. Created specifically for newcomers to eZ Publish, and using an example Magazine web site, this book focuses on designing, building and deploying eZ Publish to create an enterprise site quickly and easily. This tutorial takes eZ Publish's steep learning curve head-on, and walks you through the process of designing and building content-rich web sites. It makes the unrivalled power and flexibility of eZ Publish accessible to all developers. The book is organized around technical topics, which are handled in depth, with a general progression that follows the learning experience of the reader, and features a single magazine web site project from installation to completion and deployment. This hands-on guide helps the reader to understand the Content Management System to create a web 2.0-ready web site by creating new extensions or overriding the existing ones. In turn, it helps you to become confident when working in the eZ Publish administration area and offers an environment in which you can practice while working through the chapters.
Table of Contents (20 chapters)
eZ Publish 4: Enterprise Web Sites Step-by-Step
Credits
About the Authors
About the Reviewer
Preface
Advance Debugging

Preface

Welcome to our book on building websites with eZ Publish. Before starting to learn how to use it to create a site, let's take a short moment to better understand the overall context of content management on the internet.

In recent years, we have seen the evolution of the Content Management Systems, or CMSes. This kind of software from a simple set of tools for managing text and pages of a website, has had to adapt and evolve to become more flexible. Nowadays, CMSes need to be extensible, and use plugins or vertical modules to cater for different needs.

The concept of a web page has moved from being a mere graphical representation of information to a point where we can decouple the content from the presentation. In turn, we can also decouple content from its publication media. Today, a single item of content can be represented in boundless ways (for example, through the use of Cascading Style Sheets, or CSS), and can be made accessible from almost any device, through such things as RSS, Microformat, and so on.

Disciplines such as IA (Information Architecture) have made great strides in determining how content should be managed. New information structures have been developed across the years, from the simple and limited hierarchy of categories, to multi-structured and more complex data organizations now used in any context.

In short, the Internet has become a 360-degree communication platform, which increasingly uses various media in a single context. But the internet is also all about content, which can be represented in a lot of different ways.

This is a big problem for developers who have to create and manage sites. These new concepts have introduced new challenges for the management of websites.

In fact, the rigidity of managing information, as characterized by the old CMS generation, has led many developers to seek new solutions—solutions that are customizable according to the needs of the moment.

eZ Publish

eZ Publish was born for new media and enterprise content publishing. This product can be used by all levels of developer to build corporate websites, intranets, web shops, and media portals. eZ Publish is 100% open-source, available either as a free download or as an enterprise solution (as eZ Publish Premium with support, guarantees, and maintenance for companies that need advanced help).

In the first year of its life, eZ Publish moved from a Content Management System approach to a Content Management Framework approach. A Content Management Framework, or CMF, can be defined as an application programming interface for creating a customized Content Management System.

In this book, we will be building an enterprise website with eZ Publish. eZ Publish is well-suited to a project like this due to its structured content model and versioning capabilities, as well as pre-built functionality that ensures rapid and professional deployment with minimal fuss.

eZ Publish has some key features:

  • It comes with a number of ready-to-use website packages.

  • It has lots of predefined, solid, and useful functionality.

  • It is flexible. Any behavior or components can be extended or overwritten.

Introducing the project

This book will focus on the delivery of a standards-based enterprise website for a magazine adopting eZ Publish for the first time. The book will feature a single magazine project from installation through to completion and deployment of the eZ Publish website.

The project in detail

This book is divided into three main areas: set-up, creating content, and managing it. We won't follow a linear approach but instead will try to see what we need in any given area to accomplish our tasks and then, chapter by chapter, we will drill down into concepts when needed.

  • Set-up: We perform a complete eZ Publish installation on a LAMP platform, where we will see how to configure the environment, and how to install the standard layout that we will customize in the other chapters.

  • Creating the content types and structures: We will define the content and the structures that we will use for our magazine site. We will also create custom content for managing some deeper information.

  • Managing content: eZ Publish allows us to do a lot of things with content and layout. In this area we will customize one of the standard and flexible eZ Publish templates that comes bundled with the Content Management Framework, in order to fulfill our needs. We will also set up some useful services, such as internationalization, site subscription, and a forum for creating interaction with the users. And, obviously, we will also create our site pages.

What this book covers

Chapter 1, Installing eZ Publish: This chapter will look at the processes involved in installing eZ Publish for the magazine project, including hosting requirements. The choices that need to be made during installation will also be covered.

Chapter 2, Creating Our Site Accesses: What are siteaccesses? When we work on a customer site it is useful to have different environments available to show your customer what we are doing. In this chapter, we'll create some simple site access rules to manage these areas. We will also take a deeper look at what site accesses are, and how they work.

Chapter 3, Defining and Creating Content Classes: This chapter will introduce us to the standard content classes of eZ Publish. We will also learn to create the required classes, for the additional structured content, as defined by the project.

Chapter 4, Creating Content Structure: This chapter will look at creating the default content structure for the magazine, as well as adding some initial content, so that we can see the structure and layout of various default content classes. We'll also introduce the eZ Publish backend and its functionality.

Chapter 5 Creating an Extension: We will create an extension to hold all of our customizations for this project, which is much better than working in the standard folders and will help us in any future system upgrade.

Chapter 6 Template Design: In this chapter, we will see how to apply a template to a single content or to a node folder. We will also take a look at the template overrides, and creating a design extension.

Chapter 7 Template Content Classes: Custom templates for content approval and checkout processes are important concepts in many eZ Publish undertakings, and will be featured in this chapter. We will also create a custom template for both a standard class and a custom class.

Chapter 8 Adding Community Forums: In this chapter we'll take a look at the built-in forums available through the ezwebin packages. We will implement these content classes and templates, and then work on them further, adding functionality that was not previously included in eZ Publish 4.0, but which will be useful to the magazine.

Chapter 9 Internationalization and localization: This chapter provides a brief overview of the internationalization capabilities of eZ Publish. We will implement some additional language translations for our customers who may be visiting and looking to enroll at the magazine.

Chapter 10 Creating Roles and Privileges: After all of this defining and creating, we need to actually get useful content into the system. There are a number of approaches to do so, and this chapter will cover the main ones in detail, with a short discussion on other methods.

Chapter 11 Cache configuration: The cache system is one of the most important subsystems of eZ Publish. In this chapter, we will explain how to use it and how to customize it for our needs.

Chapter 12 Deployment: The deployment chapter investigates the processes associated with deploying our development site to production.

Appendix A, APC Tuning for eZ Publish: eZ Publish, to publish the web pages, has to elaborate a lot of data. This work, in some cases, can be a CPU-eater and may slow down the response of the server. For this reason, we will learn how to install and use an opcode cache system, such as APC.

Appendix B, Advance Debugging: During the development of the eZ Publish site, it is very important to receive immediate feedback about what we are doing. We will learn how to enable and use the code debugger and the template debugger that are included in the CMF.

Appendix C, eZ Publish Extensions: We will introduce some of the best extensions developed by the eZ Publish community.

What you need for this book

Unless otherwise stated, the environment used in the examples, and referred to throughout the book, is a LAMP platform with PHP 5.2.x, MySQL 5.x and eZ Publish 4.0.1. We'll use the shipped eZ webin template that eZ System offers bundled with the CMF.

Who this book is for

If you need to work on a site with a complex publishing workfl ow, or have to manage an enterprise level site and want to use eZ Publish from scratch and without requiring hardcore programming skills, this is the book you need.

You will learn how to install, manage and customize the eZ Publish platform. This book is for you if you are not a PHP-guru, and you don't want to study the eZ Publish core functionality.

In general, however, you'll get more out of the book if you know a little PHP, understand some concepts of Object Oriented Programming, and have a general familiarity with CMS concepts.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We can include other contexts through the use of the include directive."

A block of code will be set as follows:

<? /* #?ini charset="utf-8"?
[ExtensionSettings]
DesignExtensions[]=packtmedia
*/ ?>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be shown in bold:

<?php /* #?ini charset="utf-8"?
...
[RegionalSettings]
TranslationExtensions[]=packtmedia
...
*/ ?>

Any command-line input or output is written as follows:

# cd /var/www/packtmediaproject
# cd extension/
# mkdir packtmedia

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "Click on the Setup tab on top menu."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to , and mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/1640_Code.zip to directly download the example code.

Note

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us to improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.