Creating the TSCM site

These documentation pages are no longer maintained. Please visit the new documentation site.

The eZ publish CMS can handle multiple sites. To create a new site, we have to modify the initialization files and set up the site access files and directories. In this tutorial we will modify the existing "Plain" site. The elements and default files which were generated during the standard installation will be reused.

1. Renaming the siteaccess directories
A site has two interfaces: an user and an administration interface. Inside eZ publish, these are called "plain" and "plain_admin". The "settings/siteaccess/" directory contains subdirectories for sites that eZ publish may be configured to run. Navigate to this directory and rename "plain" to "tscm" and "plain_admin" to "tscm_admin".

Make sure that the user running the web server has write access to the "settings/siteaccess/tscm" directory and the files that reside inside it.

2. Modifying the siteaccess files
eZ publish comes with a lot of configuration files, all residing in the "settings" directory. The ".ini" files are the default eZ publish configuration files. You should never change these files. Instead, you should use the override system, which is basically a set of files containing settings that will override the default configuration. In addition to the global override configuration files, each site can have its own set of override files. eZ publish reads the configuration files in the following order:

  1. Default configuration files
    (/settings/*)
  2. Site specific override files
    (/settings/siteaccess/[sitename]/*
  3. Global override files
    (/settings/override/*)

Configuration settings in (1) will be overridden by settings in (2), which again will be overridden by settings in (3). Some of the override files end with an ".append" and some end with the ".append.php" extension. The latter is because of security issues related to sites running in non virtual host mode.

Edit the "settings/siteaccess/tscm/site.ini.append.php" or "settings/siteaccess/tscm/site.ini.append" file. (It is correct that the settings are commented out with the /* and */ marks.)

Modify the "SiteName=Plain" setting by replacing "Plain" with "The Scandinavian Check Mates".

Modify the "SiteDesign=plain" setting to "SiteDesign=tscm". This tells the system to use the "tscm" design when the user/public interface of the TSCM site is accessed.

Modify the "VarDir" setting to equal "var/tscm". This tells the system to use the "var/tscm" directory instead of "var/plain".

Add the following lines above the last line of this file:

[TemplateSettings]

TemplateCache=disabled

Debug=disabled

 

[ContentSettings]

ViewCaching=disabled

 

[DebugSettings]

DebugOutput=enabled

When building a site, it is always a good idea to turn off the cache engines and enable debug output. When the "DebugOutput" is set to "Enabled", eZ publish will print a lot of debug related information right below the actual page that it has rendered. Use this information to solve problems. Debug output may be turned off at any time by replacing "DebugOutput=enabled" to "DebugOutput=disabled". The screenshots within this tutorial will not contain any debug output.

Edit the "settings/siteaccess/tscm_admin/site.ini.append.php" file.

Modify the "SiteName=Plain" setting by replacing "Plain" with "The Scandinavian Check Mates".

The "SiteDesign" setting in this file tells the system to use the default admin interface, which is exactly what we want.

Modify the "VarDir" setting to equal "tscm". This tells the system to use the "var/tscm" directory instead of "var/plain".

3. Modifying "settings/override/site.ini.append.php"
Edit the "settings/override/site.ini.append.php" file and replace the occurrences of "plain" and "plain_admin" with "tscm" and "tscm_admin". You'll probably have to do this four times.

4. Removing the plain var directory
Under "var/", each site has a directory that is used for storage of site specific content files (usually images and binary files), logs and cache files. If the "var/plain" directory exists, rename it to "var/tscm" or just delete it. eZ publish will automatically create a new "var/tscm" directory if it does not exist.

5. Creating a design directory
In the root directory of eZ publish, there is a subdirectory called "design". This directory contains all the design related files that may be used by various sites. Navigate into the design directory and create a subdirectory called "tscm". We will not (re)use any of the files that reside in the "plain" directory; feel free to remove it.

Under the "design/tscm" directory, create the following subdirectories:

fonts

(for fonts, used when rendering bitmaps of text)

images

(non-content specific images; banners, logos, etc.)

override

(for custom overrides)

override/templates

(for custom overrides)

stylesheets

(for CSS files)

templates

(for site-specific templates)

Notice that a subdirectory called "templates" is created inside the "override" directory. Also make sure that the user running the web server has write access to the this directory.

In the next section we will test the basics of our TSCM site.

Comments

Outdated documentation

Thank you, Thomas. I've been struggling to learn how setup various siteaccess because the online tutorial is nearly 4 years old and missing many important details.

However, at this juncture, all I needed was your particular reminder about resetting the Anonymous users for the new siteaccess to solve my particular situation.

Let's hope that eZ systems is able to cleanup their documentation before another 4 years goes by.

Wizard's not that useful

[quote]Bob: there is a wizard right after the installation that creates template sites more useful than "plain" (news, shop, ...).[/quote]

Of course, there are a lot of people (myself included) who haven't been able to get the wizard to work. And I haven't run across any way to run the wizard again to create a new site (the way we're doing here) without dropping your existing database, wiping out your install files, and rebuilding everything from scratch.

ez needs a lot of work in the UI department. At least from the standpoint of the install. Since I haven't been able to get past that phase, I don't have any idea what the rest of it's like.

When renaming a "user" siteaccess...

...Do not forget to modify the "Anonymous" role to grant it access to the public part of your site!

User accounts > roles and policies > anonymous (edit) > user/login (edit) > siteaccess > your_new_site_access, then save your configuration appropriately. Do this only for the "user" siteaccess of course, not for the admin interface.

See http://ez.no/community/forum/inst...access_always_asks_for_login_3_50rc2 for the details.


Bob: there is a wizard right after the installation that creates template sites more useful than "plain" (news, shop, ...).

Creating a new site

You have got to be kidding. No, I guess you aren't. EZ Publish is supposed to be EASY. Guessing at all the work that has gone into it, I cannot imagine why the developers did not make a EZ Site button called "Create a site", then a little menu that offers selections like "Template site to use for pattern," "Make one from scratch," and so on. All this renaming and editing should be done automatically.

Modifying SiteName

When modifying SiteName under [SiteSettings], don't forget to clear the cache files or you wont see the changes.

To delete the cache you have to login to the administration interface. When you are logged in: click on the setup tab (top), click on "Cache Management" (left), and click on "Clear ini caches" (right).

It's not there in CVS

But the installer creates it, and you may create it yourself.

3.5 svn

3. Modifying "settings/override/site.ini.append.php"
Edit the "settings/override/site.ini.append.php" file and replace the occurrences of "plain" and "plain_admin" with "tscm" and "tscm_admin". You'll probably have to do this four times.

---

There is no "override" subfolder in the settings folder that I got from today's 3.5 svn release!

Contents

Building an eZ publish site

Prerequisits
Situation
Creating the TSCM site
Testing the interfaces
Setting up the main layout
Creating sections
The welcome page
The news page
The members page
The guestbook
The links page


Created

17/10/2003
12:45:03 pm
by Balazs Halasy

Last updated

24/11/2004
10:24:08 am
by Raymond Bosman

Authors

Balazs Halasy
Guttorm Flatabø
Raymond Bosman



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.