Start the project: the case, a siteaccess and a design
The tutorial Building an eZ publish site teaches by building one small site from nothing. This help keeps its case and its order, and does every step the way it is done in Exponential 6. It follows the same arc as Building a site without writing code, which is the compact version; read that for the shortest path and this series for the longer walk with the book's pages (welcome page, news, members, guestbook with approval, links).
The case
A local chess club, The Scandinavian Check Mates (TSCM), about forty members who love chess and know how to use a computer. The club's old site was made by a member who moved away. Their list of wishes:
- it should look good but not bloated,
- a page with news bulletins,
- a list of members,
- a guestbook,
- it should be easy to maintain and extend.
The tutorial's lesson is in the next sentence: a list like this is only the start; the club will ask for more, so build flexibly. With a content model and templates, the guestbook and the members list are classes and views, not code.
What the book did, and what you do
The book installed the Plain site, renamed its two siteaccess folders (plain to tscm, plain_admin to tscm_admin),
edited their site.ini.append, replaced every plain in the global override, removed var/plain and made design/tscm.
Do not rename a package's folders. Make your own, in extensions, so that an update of Exponential or of a package never
touches your work.
Install Exponential (Getting started). Any site package will do; the content classes used here (
folder,article) are in all of them.Two extensions: one for settings (the siteaccess) and one for the design. A settings extension keeps the siteaccess out of the kernel's
settings/:mkdir -p extension/exp_tscm_settings/settings/siteaccess/tscm mkdir -p extension/exp_tscm_design/settings mkdir -p extension/exp_tscm_design/design/tscm/{images,stylesheets,templates,override/templates}Give both an
ezinfo.phpand anextension.xml(ezinfo.php).Register the design in
extension/exp_tscm_design/settings/design.ini.append.php:[ExtensionSettings] DesignExtensions[]=exp_tscm_design */ ?>The siteaccess in
extension/exp_tscm_settings/settings/siteaccess/tscm/site.ini.append.php: the book's settings (SiteName,SiteDesign,VarDir) are still the ones:[SiteSettings] SiteName=The Scandinavian Check Mates [DesignSettings] SiteDesign=tscm AdditionalSiteDesignList[] AdditionalSiteDesignList[]=base [FileSettings] VarDir=var/tscmAdd the siteaccess to the list in the global override (
[SiteAccessSettings] AvailableSiteAccessList[]=tscm) and choose how it is reached (URL, port or host name), as in the setup wizard. The book's[...]/index.php/tscmaddress is the old form; today the host name or the path comes from the web server andMatchOrder(Siteaccess settings).Activate both extensions, the settings extension first (Extension load order):
ActiveExtensions[]=exp_tscm_settingsandActiveExtensions[]=exp_tscm_design, thenphp bin/php/ezpgenerateautoloads.php -eand clear the caches.Development settings for your own copy only (the book turns caches off and debug on, and says so for the same reason): in the siteaccess file,
[DebugSettings] DebugOutput=enabledand[TemplateSettings] Debug=enabled. Never on a live site (Debug output and logs for developers).Test. Open the site. It shows the standard templates: your empty design falls back to the standard one, as the book says ("if the system cannot find something, it falls back to the standard design"). Sign in to the administration with your own administrator account, not the book's
admin/publish; the passwords of a new installation are set by the installer (Logging into the admin).
Clearing caches after a new template file: php bin/php/ezcache.php --clear-id=template-override,design_base --allow-root-user
(Which cache do I clear?). The book makes the same point ("do this every time you add
a template").
Next: the main layout.
Source and license
Adapted from the section on creating a new site and the main layout of of the tutorial Building an eZ publish site (written for eZ publish 3.2, 2003), originally by ez.no and released again under the GNU Free Documentation License by 7x in 2024, Book-Building-An-eZPublish-Site. Copyright (c) 1999-2024 7x and Graham Brookins. Licensed under the GNU Free Documentation License, version 1.3 or any later version, with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts (the license). Changes: rewritten for Exponential 6: extensions instead of renamed folders, current settings and operators, no inline style, and a modern page frame.