[dokuwiki] Re: Core devs: I need some info to keep my templates maintainable

  • From: Anika Henke <anika@xxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 10 Feb 2011 01:39:39 +0000

Hi,

1) What about the future? I'm asking because of this new
<http://www.dokuwiki.org/template:starter>. And AFAIK there will be a
new default template soon. Is is better to use the "starter" or the new
"default" template css as starting point for the approach described
above? Wich one will be more "modular"?

The new default template (called "dokuwiki", btw) is based on the starter template. And whenever I change something important in any of the core styles (those starting with "_"), I usually update both. At the moment and I also think in the future, the core styles of the starter and dokuwiki template will be 98% the same. So, from that point of view, it doesn't matter if you will base a new template on the starter or the dokuwiki template.

But the dokuwiki template will have much more design (and therefore more styles for certain non-core design elements) and images and fancy stuff. I can imagine people will be lazy and not delete those. So, from that point of view, I'd say it's better to use the starter template.

Disclaimer: As the author of the starter template (well, and one of the authors of the new default template), I might be biased. I would always recommend using the *starter* template as a starting point. Especially as it was designed to be used as a starting point and special attention was paid to maintainability.

2) Is "Directory Layout" at<http://www.dokuwiki.org/devel:templates>
still valid?
Chi's templates are respecting the described directory
layout but<http://www.dokuwiki.org/template:starter>  does not. I also
prefer a non-standard layout like starter, I like to keep things tidy,
putting images, css etc. in own folders. Is "Directory Layout" just a
recommendation?

You are only talking about the css directory here, right? (Because everything else is the same.) The only drawback with the css in a directory of their own is the parsing bug with slashes in style.ini in a certain PHP version. (When we started the new default template we considered not doing it because of that. The decision might still be changed.)

The directory layout on devel:templates should reflect the best practices and be a recommendation. Therefore it should be updated accordingly. (E.g. a "style.ini.dist" and a "tpl_functions.php" makes sense for many templates and could be added there. And "script.js" should also be explained.)
Maybe an "inc" directory would also make sense (for the include hooks)?

Cheers,
Anika
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: