Forums / General / design directory structure?

design directory structure?

Author Message

gerry rodman

Saturday 22 May 2004 9:02:59 am

I am trying to understand the big picture of the first level directories under the design dir but I find that the docs don't really address this subject from a high enough level to answer my question.

With v3.3-5 under the design dir, I have three dirs... standard, admin, and shop (I installed as shop)

With v3.4 beta 2 i get and additional directory called base.

I have questions about the basic purposes of these dirs... my guess is that the answer is simple but I don't quite see the relationships.

Lets start with standard:

MOST of the stuff here appears to be geared toward the admin interface. Is my observation correct? It is ALL related to the admin interface? If so what is the relationship between it and the admin dir (under the design dir). What is in the admin dir which is not in the standard dir?

V3.4 beta base dir vs. shop:

These dirs seem to contain duplicate files, some of which appear to be the identical in content.
I assume shop is designed to override the base dir. But if so, why are many of the files in shop, identical (in content) to those in base? Is any of the public facing interface stuff based on or does it refer to anything in the standard dir or (again) is the standard dir strictly for admin.

If someone could answer these question and / or provide a general definition of the relationships of the first level of dirs under the design dir...I would be most grateful.

Cheers

gr

Roy Bøhmer

Wednesday 26 May 2004 1:13:43 pm

Well, I'll give it a try...

In my opinion a clear understanding of siteaccess is fundamental to an understanding of designs. A very simplified explanation could be:
- A site contains of one database. The shop-site uses the shop-database, news uses news-database etc.
- The database contains (among other things) the content
- Often you want to approach the content in different ways according to what you want to do. ex: If you want to administrate the site you want to give different permissions to the content than you will give to the reader.
The eZ-way to do this is to set up two different siteaccesses to the same site/database. You can have as many siteaccesses to the same site as you like. (And you can have as many sites as you like too...)

So where does the design comes in?
For each siteaccess you define which design to use. The designs available are found in the first level under /design/.
The standard-design is rarely used as the main-desing in a siteaccess. Insted its used as a "fall-back-design". In your example the shop-site use the shop-design. But when the system fails to find the desired template in /design/shop/ it searches in /design/standard/. The standard-design therefore contains general templates aimed to serve every kind of request.
Yes, the standard-design also contains many templates aimed to the admin-interface ("every kind of requests..")

In this way you can easily make a new siteaccess and a new design to the same site, or you can use the same design to several different sites. If you install more than one of the example-sites (shop, blog, news etc) they all use the same admin-design. But the user see the sites in different ways because they see an other siteaccess which make use of an other design.

Hope it helps.
I've not tested 3.4beta and is new to the base-dir. Sorry.

The dirs under /design/ spesifies a way to