Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-07-04 17:14:49

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

A new default template for Textpattern

With the new/future Textgarden, and more and more themes published on TxpRessources and other websites, I thought it may be the time to re-code the templates and code of default install by the future 1.0 release.

By template I mean the pages and forms mostly. I’m not really talking about the CSS, it will be taken care of – I guess – by Textgarden and the “Txp theme engine” when this one arrives.

The objectives of the default install should be:

  1. To allow more control over each element by the designer making “default install” CSS themes, by adding strict semantic content and ID&classes to most elements
  2. To help the beginners understand what’s doing what and why, and help him when he will start customizing things
  3. Help the CSS newbie customize the appearance of his website, with more control over each element

I asked Dean about it, it seems ok. But before submiting these to him for possible integration, I wanted to ask you for any input or comments about what should be in these, and present some first draft for comments and critics :)

The files can be found here , they produce a very basic website with a touch of blog; valid xhtml strict and hopefully semantic.

Any comments or ideas ?

Last edited by Jeremie (2005-07-04 17:15:21)

Offline

#2 2005-07-04 23:02:30

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: A new default template for Textpattern

Nice one Jeremie. :) I’ll have to download them and play around but an initial thought is that in the single article form you have given the article title an “h1” yet you have already used the “h1” for the header title in the default page template. That might cause a problem. I always think article titles should be an “h2”. Glad to see you’ve popped something into the footer. :) Always thought that was a bit of an oversight.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-07-04 23:35:51

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: A new default template for Textpattern

Two schools of thought on how headers should be used are Dave Shea’s Markup Guide and Mark Pilgrim’s Using real headers. There is also this roundtable on using h tags.

There doesn’t seem to be a great deal of consensus, other than they should be used.

Offline

#4 2005-07-04 23:43:55

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: A new default template for Textpattern

Don’t you just love “experts”? :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-07-04 23:50:41

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: A new default template for Textpattern

Yep there’s two school. One say h1 should be used once, the other say otherwise. Frankly, on this, I don’t care. For me it’s basic common sense, h1 is not the title tag (which is unique, as an ID attribute for example, nothing say hx are unique).

If in theory I might get into the debate, with TXP I don’t think this is an issue. h1 header is freely available to any authors via Textile, without any kind of native control over it (you’ll need hacking or plugin to say “no no” to the authors, and that’s just advice not real control).

So to me it make more sense using several h1 instances, because the beginner will use them too; and it’s not wrong on the semantic side (well, it’s debated somehow).

Offline

#6 2005-07-04 23:57:31

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: A new default template for Textpattern

Is h1 available in comments textile?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2005-07-05 00:44:37

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: A new default template for Textpattern

Nope.

Offline

#8 2005-07-05 00:53:59

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: A new default template for Textpattern

Phew!! That’s alright then. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#9 2005-07-05 02:08:54

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: A new default template for Textpattern

I’d say that’s an excellent job! In reviewing the default template (and admittedly, primarily thinking about the ability to use CSS more than XHTML semantics), there’s two things that came to mind. One, it’s often helpful to have an overall “content wrapping div” enclosing everything after the header (id=“wrap”). And two, in the div id=“secondaryContent”, it would be good to have each txp:element (categories, XML link, link list, and recent comments) wrapped in their own div with id. This would help with box model issues (outer div defining width, inner div defining margin/padding), as well as giving the possibility to use “display:none” on any of those id’ed elements you don’t want to show (not everyone uses all four), or simply differentiate how the list items look (i.e., make the link list render entirely differently than the other lists).

As for the h1 versus h3 issue for article titles (now there’s a sematic argument), I’d cast my lot with maintaining consistency with the current templates, and allowing a sematic ordering to the headers themselves. A home page full of h1’s, in effect, says it is all equally important, or, there is no ordering of importance.

Again, those are minor semanic points, as overall this would be a massive improvement over the current defaults, as is. Good work!

Last edited by reid (2005-07-05 02:10:12)


TextPattern user since 04/04/04

Offline

#10 2005-07-05 03:41:35

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: A new default template for Textpattern

reid wrote:
One, it’s often helpful to have an overall “content wrapping div” enclosing everything after the header (id=“wrap”).

There’s already html and body you can adress, another overall container can be useful ?

And two, in the div id=“secondaryContent”, it would be good to have each txp:element (categories, XML link, link list, and recent comments) wrapped in their own div with id. This would help with box model issues (outer div defining width, inner div defining margin/padding), as well as giving the possibility to use “display:none” on any of those id’ed elements you don’t want to show (not everyone uses all four), or simply differentiate how the list items look (i.e., make the link list render entirely differently than the other lists).

Indeed, I missed that one. Done.

As for the h1 versus h3 issue for article titles (now there’s a sematic argument), I’d cast my lot with maintaining consistency with the current templates, and allowing a sematic ordering to the headers themselves. A home page full of h1’s, in effect, says it is all equally important, or, there is no ordering of importance.

Uh ? I didn’t understand you there (well, it’s 5h30am here). Right now you have in article list mode:

h1: site’s name (with specific id)
h2: article’s title (with specific class)
h2: article’s title
h2: article’s title

And in single article mode:

h1: site’s name (with specific id)
h1: article’s title (with specific id)
the article’s body that might contain h1 headers, as the author sees fit

I know it’s borderline on the semantic between the article’s title and the h1 inside the body, but again without any sort of control from Textile and if we use h2 here I think 90% of beginners (or even overall users) will produce something like:

h1: site’s name (with specific id)
h2: article’s title (with specific id)
body
h1 body title
more body
and so on

which is baaaaad.

Plume-CMS does this iirc, its “first header” text-code render a h2 or h3 (because it has multiple pages features – “chapters”- for article, and in a article h2 is used as a chapter’s title if on chapters mode). But TXP & Textile don’t, so we’re back on using ID (and the html title tag) to give weight to the site’s name and the article’s title. Not perfect, but the other option is worst I think.

Don’t forget it’s a default template, if someone has trouble with this or disagree, it has by definition the skills to do his own template :p

I also would have added headers (h3 I believe) for the extra content (categories links, links, xml feed and so on) but in a full dynamic mode it’s impossible right now without php because we have to handle if this TXP has the datas (does it have categories or not) or not.

Again, those are minor semanic points, as overall this would be a massive improvement over the current defaults, as is. Good work!

Thanks.

Last edited by Jeremie (2005-07-05 03:51:29)

Offline

#11 2005-07-05 03:48:50

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: A new default template for Textpattern

I’ve done some minor editing on the article forms, to prevent multiple ID in the same page especially if the future webmaster use them as a base work to build upon. By the way, it valid as 1.1 ;-)

Offline

#12 2005-07-06 10:51:30

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: A new default template for Textpattern

Ok I’ve done some tweakings, mainly adding a lot of HTML comments to help beginners (start&end of each form, explaining the article context on the conditionnal state, things like that).

I’ve got the comment_popup to do, and the CSS (is someone want to do the CSS he’s welcome, something very simple), then I mail the whole thing to Dean.

If you have comment (good or bad) on the page&forms, make them… after it will be too late :)

Offline

Board footer

Powered by FluxBB