Proposal to move Zen theme to Zengine

Events happening in the community are now at Drupal community events on www.drupal.org.
jjeff's picture

I'm nervous about how there are now 3 different projects with similar goals:

1) The (original PHPTemplate-based) Zen theme
2) The Zengine theme engine
3) The ZenZen (Zengine-based Zen) Theme

The main issue is that there will inevitably be code-drift and these projects will fall out of sync with each other. Fixes to the Zen theme may not show up in the Zengine theme, and vice versa.

In the interest of clarity, simplicity, and removing the need for code sync, I would like to propose that we aim to move the original Zen theme onto the Zengine engine and remove the need for the ZenZen theme.

Please discuss.

Comments

How does Zengine differ from phpTemplate?

bonobo's picture

Is the easiest way to these differences just to look at the two themes, or is there a writeup about this somewhere?

My instinct (generally) is to simplify and collaborate, but I'd be curious to know the advantages of Zengine over phpTemplate.

Thanks,

Bill

Check this out:

magdelaine's picture

The Skypecast in particular is very revealing on what Zengine does that is over and above phptemplate: http://groups.drupal.org/node/3954 but the IRC discussion is helpful too.

learn one, teach one, do one

why Zengine?

OpenChimp's picture

My first exposure to templating systems was when I started working with drupal. I'm really only familar with PHPTemplate, so that's where I'm comfortable. I would imagine this is a similar situation for much of the drupal community. I just started using the Zen theme (with PHPTemplate) and am really enjoying it as a foundation to build on.

What will moving to Zengine mean for us themers in terms of new practices to learn?
Will it be more difficult to find useful code snippets in the drupal community?
As someone else asked, what are the benefits of Zengine? Why consolidate to Zengine instead of to PHPTemplate?

Would it work to simply

magdelaine's picture

Would it work to simply split the projects and find someone to take over the Zen theme? I agree it may be very difficult to keep two themes on different frameworks in sync. If Zengine works the way you propose it will, the needs for each theme (Zen and ZenZen) will diverge pretty rapidly.

learn one, teach one, do one

Zengine not needed for Drupal 6

johnalbin's picture

Drupal 6 has .info files for Themes and one of the lines in a .info file can be: base theme = zen

Which means that the template.php file and all the .tpl files from the "base theme" will be used unless overridden by the current theme.

So, Zengine (as I understand it) is, at best, a stop-gap measure needed for Drupal 5 only. Sorry, Jeff. That’s what you get for fearing to do core development. ;-)

So, for Drupal 5, the Zengine theme engine should require the Zen theme and use the Zen theme's files for other Zengine-based themes. That way we won't have to worry about code drift between Zengine and Zen (since Zen has all the CSS, template.php and .tpl files.) Funnily enough, the Zen theme wouldn't need to be a Zengine-based theme, which would make the move to Drupal 6 super easy. And Zengine-based themes can be easily upgraded to D6 by using base theme = zen in the .info file and @import "../zen/style.css"; in the CSS.

Sound good?

  - John

Albin.Net : friendly web development

  - John (JohnAlbin)

Questions

jjeff's picture

I like this concept and it sounds like a pretty good plan. A couple of quick questions though:

  • Can subthemes in D6 have their own template.php files?

  • Can they have their own page.tpl.php files?

These features feel like a bit of a hack in the Zen theme.

I'm cool with continuing Zengine as a stopgap measure until D6 comes out. Then it should be pretty trivial to port Zengine over to the template.php file in Zen for Drupal 6.

-= Jeff Robbins | Lullabot | Drupalize.me =-

Subthemes

johnalbin's picture

Yes, subthemes can have their own template.php and *.tpl.php files. They would override the files in the base theme.

  - John

Albin.Net : friendly web development

  - John (JohnAlbin)

So in effect, Zengine is

Christopher Herberte's picture

So in effect, Zengine is Deprecated!? :) Bwhahahaha! -- or has someone already pointed that out?

It makes no sense to continue two themes, Zen and ZenZen my thoughts is to amalgamate all the zenny projects. In fact Zengine should be a wire-frame (It's really confusing having the theme engine styled, keep it simple) Zen theme efforts could be refocused on the Zengine and ZenZen (or does this sound silly) My 2c.

The Plan!

jjeff's picture

Yes, Zengine will become deprecated in Drupal 6. And things will get, admittedly, a bit confusing during the Drupal 5 cycle. But there is a plan and everything will (hopefully) settle back down in Drupal 6.

The plan:

1) The Zen theme will remain PHPTemplate based for Drupal 5. It will continue on essentially as-is so that people who are using it currently don't have to get confused by all this hubbub that we're doing with the Zengine.

2) The Zengine theme engine is designed to provide an underlying foundation for Zen-like themes. As a "starter theme" it was implicit that theme developers hack the original Zen theme. Of course once they hack the code, this means that they're on their own. Zengine is an attempt to provide a foundation with default page.zen.tpl, node.zen.tpl, layout.css, style.css, etc. etc... that theme developers can choose to fall back on or not... It is possible to create an entire Zengine based theme simply by defining a .info file and creating just one CSS file.

3) ZenZen is simply an example Zengine-based theme. It implements the design of the original Zen theme.

4) Several of the theming changes that are going into Drupal 6 will allow for the Zen theme to essentially replicate what Zengine is doing. Themes will have their own .info files that can define their parent theme. Zengine will then become part of the Zen theme and Zengine themes will become essentially Zen sub-themes (although they won't need to live in the Zen directory). The process of porting a Zengine-based theme over to D6 will be documented and VERY straightforward -- you'll basically just edit the .info file and maybe change a couple of file names.

That's the plan! In Drupal 6, Zengine will be gone and there will be Zen-based themes will simply require that the Zen theme to be installed. For people who want to get started with this functionality now, there's Zengine for Drupal 5.

-= Jeff Robbins | Lullabot | Drupalize.me =-

...

niklp's picture

I don't mean to be obtuse, but... there's lots of talk here, but I haven't yet seen a list of what this "new functionality" actually is...

Any chance of a pointer to a link or some further info?

TIA

Nik