Wiki ⇒ v9 Developer's Manual ⇒ Dragonfly Themes ⇒ Revamping Dragonfly’s XHTML markup model ⇒ CPG Dragonfly™ CMS
Wikiv9 Developer's ManualDragonfly Themes ⇒ Revamping Dragonfly’s XHTML markup model

13.7. 9: Revamping Dragonfly’s XHTML markup model Parent


This page is intended to describe the steps necessary to revise Dragonfly’s XHTML markup model. Written by Pazu.

The problems with the current markup model:

  1. Old ’90s code designed for version 3 and 4 browsers left over from PHP-Nuke; every PHP file contains nested tables and hardcoded presentation stuff (widths, heights, borders, backgrounds, cellspacings, cellpaddings)
  2. Little meaningful markup; only XHTML validation is claimed (although many errors remain)

What’s Needed

A new markup model that enables complete styling via CSS. This will be a huge project, somewhat akin to the work going on to finally update Slashcode to produce modern markup.

This new markup model will likely be both simplified and more complex.

Simplified because:

Excessive markup with no logical purpose beyond visual formatting will be removed such as nested tables as well as tables in general, for that matter

More complex because:

Just about everything written from PHP will have class and ID attributes, especially any time a variable is written it will be contained in a <span/> at minimum (e.g., <span class="L_LABEL">{L_LABEL}</span>). This gives the CSS themer unprecedented control on both macro and micro levels.

Tables, when they must be used, will employ row and column groups.

Form fields will use legend, label and fieldset elements.

Since the back-end code will know nothing about front-end presentation, PHP and template files must err on the side of greater logical markup so CSS has complete access.

Some images are better written as list-item-image attributes, or even generated content using :before and :after pseudo-elements.


Created: Thursday, September 22, 2005 (14:06:41) by Pazu
Updated: Thursday, September 29, 2005 (01:48:48) by DJMaze