Theme best practice

Author Message

Dave Smith

Wednesday 24 June 2009 12:49:26 am

This is a follow on to my previous post about themes.

Is there any approach that is considered 'best practice'? Would I be best to

1) tailor ezwebin using css, or
2) go with the plain site and sort out the templates that I need to override?

I can see that 1) is more less complex but I imagine 2) is more flexible (i.e. complete control).

I want to make sure I start off on the 'right' road and don't paint myself into any legacy corners so early in my ezLife.

Thanks

Gaetano Giunta

Wednesday 24 June 2009 1:11:52 am

Choosing between plain site, ezwebin or ezflow is not as much a question of styling as a question of functionality: do you need the ezflow frontpage class that lets editors compose pages with blocks or not? [if yes, go for ezflow] And do you need the editing-in-frontend toolbar? [if no before and yes here, go for ezwebin].

You can start out with styling via css in any case, but for any serious work you will have to do a little bit of tpl anyway sooner or later.

All in all picking the best approach might be more a question of time/resources: for big projects starting with empty templates and importing only the needed functionality might lead to cleaner / better code, but it takes of course more time than just customizing what exists.

Principal Consultant International Business
Member of the Community Project Board

Marko Žmak

Wednesday 24 June 2009 1:47:36 am

From my experience i came to conclusion that is better to start with a plain site except for very small pages that have to be done quickly and won't require further development.

For all bigger project is definitely better to "start from scratch" make your own classes and write your templates that suit your needs. There are some templates that can be used from default eZ installation (like templates for rendering OE fields and tags), but they are all available when you use the plain site.

Also when you work with eZ publish for a long time it's useful to have a set of your own templates for some common functionality that can be reused on many sites.

Some reasons why is better to "start from scratch":

1) you have your own code for which you know how it works (rewriting other people's code can give you a lot of headache)

2) the templates will be organized in a way that you want so it will be more easy for you to work with them

3) if you are working in a team with a frontend developer which makes HTML/CSS it is better that the frontend developer gives you his HTML/CSS and then you intergrate eZ functionality into it. Of course, the frontend developer must be familiar with eZ concepts

4) the templates that come with eZ are not always up to date with the newest eZ version so you could find some obsolete pieces of code in it (like {section} instead of {if} and {foreach})

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Dave Smith

Wednesday 24 June 2009 4:25:11 am

Just the information I needed.

I have only been lurking around for a few days now but I'm impressed by the speed, accuracy and professionalism of the responses, only matched, in my opinion, by the Expression Engine forums.

Thanks again

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