Databases, designs, and other

Author Message

RW Wood

Friday 05 September 2003 3:07:32 pm

I'm still playing with ezP3 before I get into the actual design of my site, so I downloaded the latest beta and was surprised to see that it installs a separate database for each of the demo designs that come packaged with the installer. (Nice install package by the way)

In any case, I'm now a bit confused as this seems like a great departure from version 3.1, where no matter how many designs, there was only one database. It also presents a problem in that my site will have several designs, but is hosted where only one database is allowed. Could someone explain why the multiple database approach?

Secondly, I'm doing my site design locally on a Win2000 box, but the site itself will be hosted on a unix machine. In both cases, is there a way to, when I'm ready to actually design the site, install a database with no data, or do I manually have to delete all the "stuff" that's in the package?

Next, as I said, my site will have several designs and two languages. The only real difference in the most of the designs is some differences in table cell color that is set by the style sheet, and a different header image. That being the case, how can I structure my design folder and attendant templates so as not to have to change a dozen sets of templates every time I want to tweak the site?

Thanks. You at eZ Systems are doing a great job and one of the most aggressive at bringing out upgrades.

RWW

Paul Forsyth

Saturday 06 September 2003 2:31:08 am

About the multiple databases. Ez 3.2 has a new package feature which allows classes to export and imported. Ez have used this feature to implement their demo designs, what you see when you execute the set up routine. Due to the fact that the package program is not due to be finished until Version 3.3 (no object/datatype etc support yet) they chose the multiple database option for their demo sites.

This doesn't mean that anything has changed internally. Your sites can still co-exists in the same database through difference sections or different pagelayouts.

Have a seach through the forums for packages and you will find discussions on that topic and what the system will eventually be capable of doing. I would suggest following the forums once 3.2 is released and you will see where the package system is going.

About clean databases, there are sql files available with ez to do this. For example, inside the directory:

kernel/sql/mysql/

you will find several files. 'kernel_scheme.sql' contains the ez sql tables, and 'cleandata.sql' contains fresh data to put into those tables. The same files exist for postsql. Take a look. Im not sure of how to refresh your systems on windows but you shouldn't have trouble here (im a linux person).

I assume you have different pagelayouts for your different designs? Do you also have different sections for objects? If that is the case then it is relatively easy to check the section an object is in and deliver html with the correct css tag to display your content in the colour you need.

Hope this helps!

Paul

RW Wood

Saturday 06 September 2003 8:23:46 pm

As to the last paragraph, perhaps I should have said that the only difference between the pagelayouts and languages is a different header image and minor differences in stylesheets. I don't want to have to change all the pagelayouts every time I want to make a change to the site. In other words, should I decide to have the site three column rather than two, I don't want to have to change templates for every design.

My understanding is that with the override system built into ezP, I should be able to structure the site so that every design uses the same set of templates, but substitutes the different header images and style sheets as necessary. Take a look at www.every-nation.com to get an idea of what I'm trying to reproduce in ezPublish 3. Currently, the site uses version 2, and the problem I have is the one I described-- having to change too many files every time I want to make a minor change in design.

There's probably a way to do what I want dynamically with php, but I'm don't know it well enough to know how to do it.

Thanks for your input.
RWW

Paul Forsyth

Sunday 07 September 2003 2:54:07 am

I suggest reading up on what you can do with template logic. This is what you want to use to differentiate between site designs. For example:

{section show=eq($node.section_id, 2)}
<td class="design1">
{section-else}
<td class="design2">
{/section}

Note, that my eq code is from memory and may will very likely differ... But i hope you see my point. You can design your templates to work off different designs, and consequently change css whenever you need to without changing your templates.

Read up on what you can do with templates. Since you mention doing what you need in php you will likely find you can do all you need in templates. You just need to spend a little time getting your head into the right mindset. Took me a while before it clicked :)

Paul

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:26:34
Script start
Timing: Jan 18 2025 22:26:34
Module start 'layout'
Timing: Jan 18 2025 22:26:34
Module start 'content'
Timing: Jan 18 2025 22:26:35
Module end 'content'
Timing: Jan 18 2025 22:26:35
Script end

Main resources:

Total runtime1.3814 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.0313152.6406
Module start 'layout' 0.00530.0022 740.671939.4766
Module start 'content' 0.00751.3719 780.1484489.6250
Module end 'content' 1.37940.0019 1,269.773416.1484
Script end 1.3813  1,285.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2333160.0002
Check MTime0.00140.0996160.0001
Mysql Total
Database connection0.00060.045410.0006
Mysqli_queries1.330196.2888600.0222
Looping result0.00060.0460580.0000
Template Total1.354198.020.6770
Template load0.00190.138720.0010
Template processing1.352297.884220.6761
Template load and register function0.00020.013110.0002
states
state_id_array0.00080.057810.0008
state_identifier_array0.00110.081720.0006
Override
Cache load0.00160.1155350.0000
Sytem overhead
Fetch class attribute can translate value0.00110.081220.0006
Fetch class attribute name0.00120.089940.0003
XML
Image XML parsing0.00020.017520.0001
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00080.0559100.0001
String conversion0.00000.000440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs