You may have a look how I refactored the slideshow. (slideshowtwo.tar.gz)
Urs Hunkler
Posts made by Urs Hunkler
CSS Zen Garden is nice - and it's one reason why the myth keeps alive.
CSS Zen Garden is a visual experiment initiated to prove the power of CSS in a time where all the world worked with tables and presentational markup. The page/content has a simple structure and only some text is used.
When you have to deal with table-less accessibility and SEO friendly 2-1-3 three-column layouts as they are needed for Moodle you will very fast notice the limitations. Sounds complex and is complex. The CSS Zen Garden is a Kinder Garden and a Web design student playground compared to real world tasks.
The important message is: use clear XHTML structures without presentational markup. Use CSS for the design. Use unobtrusive JavaScript for a behavior. The message is not - You can change anything with CSS. All three aspects play their important roles and you get well working pages only when all three aspects work together nicely.
In Moodle we deal with complex structure and content.
Another aspect: Let's talk about time and money.
I don't get payed for my work on templates. My motivation to investigate is the need to help to create a Moodle 2.0 where it is more easy for me as a web designer to build Moodle layouts which fit customer needs.
In the moment I need to correct too many inconsistency issues in Moodle and tell clients too often that their needs can't be fulfilled with Moodle. Or that it will be so expensive that they can't/don't want to pay. The design work with Moodle is much more expensive than it should be. The outcome is that it's harder for me to earn the money I need for living than it should be when I work with Moodle.
And that is the situation with every visual designer working with Moodle who tries to earn her living with this work.
How people react in this discussion: Martin D. has shown a possible way to proceed. Martin L. argues categorically against changes. Tim asks me to solve some sophisticated tasks. Only to give some examples.
I am sorry but I don't have the time now to investigate so deeply in the very moment. To those who are interested in possible ways to evolve complex and rich applications like Moodle I recommend the book "PHP in action" I had mentioned in a previous post. The authors don't mention Moodle but they write about complex web applications, about readable and maintainable code, the work with SimpleTest for test driven development and HTML_QuickForms for form handling. All aspects apply quite well to Moodle
And they show the advantages in the work with templates.
Web applications based on templates are often easier to handle for a bit more sophisticated visual needs than changing colours or the logo. We can create visually richer outcome in less time (for less money).
Martin,
thank you for your long answer.
@ We do have different perspectives and experiences though. And mine is that some things that seem possible to fix with templating are actually... almost impossible for something of the richness and complexity of moodle (tiny projects sometimes can)
The authors of "PHP in Action" tell the opposite and help to understand and implement. I trust them.
I mentioned the book in a previous posting.
Tim, @ "Now, Ajax often involves JavaScript code creating and updating HTML. If the HTML can be varied using templates, how do you ensure that the JavaScript continues to work, and generate the same HTML as the server-side code?"
Mostly when working with Ajax you use a DOM element like a DIV with an ID as a container for your Ajax output. One must not change that container - but you can move it in the XHTML structure as needed. Working with templates gives more freedom - and as always with more freedom more responsibility: you need to be careful not to break the page.