Chapter 4. Creating Content Structure

The Guide is definitive. Reality is frequently inaccurate.

—The Hitchhiker's Guide to the Galaxy, Douglas Adams

In Chapter 1, we installed eZ Publish; in Chapter 2, we configured the site access; and in the Chapter 3, we created the content class we have to use. Now it's time to use all of the work we did to create the new enterprise-level site for our Packt Media magazine. But before that, to better understand what we will do next, we'll introduce the eZ Publish backend and its publishing-related functionality.

In this chapter, we will:

  • Learn how to use the eZ Publish backend
  • Look at creating the default content structure for the magazine
  • Add some initial content, so that we can use the content classes that we created in the last chapter

To begin with, let's open a browser and go to the administration panel of eZ Publish, at http://packtmediaproject/index.php/ezwebin_site_admin.

Understanding the backend

In Chapter 3, we focused on the Setup tab, and created new content classes and class attributes. Now we'll take a step back and get introduced to the backend of eZ Publish, to understand how the Content structure and Media library tabs work.

Understanding the backend

As we can see, the backend of eZ Publish is divided into four main areas:

  • The navigation bar (on the top of the screen)
  • The secondary menu (on the left-hand side of the screen)
  • The content area
  • The right-hand menu

Inside the navigation bar, we will find the main menu and a breadcrumb path.

Note

What is a breadcrumb path?

Breadcrumbs or a breadcrumb path is a navigation aid used in user interfaces. It provides users with a way to keep track of their location within programs or documents. The term comes from the trail of breadcrumbs left by Hansel and Gretel in the popular fairytale.

The navigation menu contains the links to all of the main sections of the CMS, and also includes a classic breadcrumb path that helps us to understand where we are and how we get back to where we were.

Understanding the backend

The secondary menu and the content area will change, contextually, based on the CMS section we are in. The right-hand menu will only contain user- and debug-related information.

In this chapter, we won't see a description of all of the CMS section tabs in depth. We will focus only on the first two tabs. When you start using eZ Publish, you'll understand the similarities in the other sections.

Content structure

The Content structure section represents the site content tree that is usually seen on the frontend of the site. In the secondary menu of this section, we can see a dynamically-generated tree structure containing the content nodes, and the details of the selected node, in the content area.

Content structure

The Media library acts the same as the Content structure, but is basically a repository of all of the media content that we have uploaded into the CMS. Every time we upload something, eZ Publish will understand the type of media (audio/video, image, or other type) and will place it in the correct folder of the Media library section.

The secondary menu

The secondary menu is often called the left-hand menu. It contains the content tree of our site, and provides us with a shortcut to create and manage this tree.

The secondary menu

The secondary menu acts as a file browser, just as it does in some operating systems. In the content tree, you can easily see what is a folder object (that is, content containers) and what is a content object, just as you can do in Windows Explorer or Gnome Nautilus.

As with a file browser, the content tree has a context menu that is triggered when you left-click on a content icon (folder or any kind of content class). The contextual pop-up menu that appears allows you to perform many of the normal operations that can be performed via the standard interface. Moreover, it also provides access to other functionality, via the Advanced voice of the pop-up menu that will be enabled in particular context, such as clicking on a folder or a particular type of data.

This pop-up menu is present every time a node tree is displayed in the CMS, independent of the area. You will learn more about this when we introduce the Sub items box.

Note

If you cannot display the expanded content tree, you need to configure the AJAX behavior inside the settings/contentstructuremenu.ini file. To do this, we will override the file and copy it into the settings/override directory. Then, we will open the file in a text editor, and set the dynamic option under the [TreeMenu] section to enabled as follows:

cd /var/www/packtmediaproject/settings
cp contentstructuremenu.ini override/contentstructuremenu.ini.append.php
vi override/contentstructuremenu.ini.append.php
[TreeMenu]
# If set to enabled,the admin tree menu is fetched
# and built dynamically on the fly.
# Requires a web browser with AJAX support.
Dynamic=enabled
...

The content area

The content area is a container that is used to show the details of the active node. This information is placed in different boxes, which are either shown or hidden by the editor.

The content area

We see five tabs across the top, which, when enabled or disabled, will add information to or remove information from the content area. The tabs are:

  • Preview
  • Details
  • Translations
  • Locations
  • Relations

Moreover, there is one more box (Sub items, under the box containing the object preview) that is always visible. This is related to the subitems of the object and object contextual menu. Each tab is explained in the subsections below.

Preview

This first tab is usually enabled, by default, by the CMS. It shows the content that we created, without any layout or style information. Inside this tab, the latest updated information is displayed.

Details

This tab shows information about the node history. This includes details about who created the node when, to which section it belongs, the node or object ID, and all of the counters related to the versions and translations.

Details

Translations

This tab shows what translations are available for the current node, and which translation is the default one. We can also edit or directly create a translation from this tab. We will learn how to translate our sites in Chapter 9, when we introduce the internationalization capabilities of eZ Publish. For the moment, we should bear in mind that eZ Publish allows us to translate all of its object, nodes, and templates into different languages.

Translations

Locations

A node object of eZ Publish can be placed in several different locations. Thanks to the information tab, we can see where the current node is located and we can choose the default location. We can also set the visibility flag for single locations by enabling or disabling the content in the frontend.

Locations

Relations

This tab shows all of the relations that this object has with other objects. This tab is very useful when we have to manage content nodes that are generated by merging different objects. For example, an article that incorporates images or videos from the Media Library.

Relations

Moreover, this tab will also show the Reverse related objects that will help us to determine if the selected object is used elsewhere.

Sub items

Under the tabs box, there is a box called Sub items. This box lists all of the objects that belong to the displayed object:

Sub items

Inside this area, it is also possible to set the priority of the items. This determines the publishing order. You can also edit or create elements directly, by using the pop-up context menu, which is accessed by a click of the left button of the mouse on the node icons.

In this box, it is also possible to change the view mode by switching from the default list mode to a thumbnail mode (in which images will be displayed as thumbnails). Alternatively, you can change to a detailed view, where more information (and actions) for all of the items is displayed.

Under the Sub item box, there is a small select form that permits us to create new objects inside the current node.

Object contextual menu

As with the secondary menu, if we click on the icon of the selected object, a new pop-up menu will appear. This menu is strictly related to the active object, and will expose a lot of functionality, which we will use in the coming chapters.

Object contextual menu

The menu gives us shortcuts to:

  • See the content class of the object
  • Edit the class for the enabled languages
  • Delete the cache of the object, or of the related subtree
  • Override the template, class, or node
  • Manage the version and the URL aliases

We will go deep into the overriding and caching functionality in the coming chapters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.227.82