Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-14 12:15:45

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,609
Website

textile and definition lists?

Are definition lists (dl, dt, dd) possible with textile and what would be the notation? I’ve not found it in the normal resources.

How should a class best be attached to a particular element in textile, e.g. to get dd class=“img” or dd class=“text”?


TXP Builders – finely-crafted code, design and txp

Offline

#2 2006-03-14 16:40:13

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: textile and definition lists?

Definition lists did not make it into version one of Textile (I think), which is the version in Textpattern (I think). Version 2 allows them in the format:

<code>dl. term:definition
term2:definition</code>

you can attach class and ID information to block elements in the following way:

<code>p(yourClass). here is a class definition on a paragraph
p(#yourID). here is a class definition on a paragraph</code>

Offline

#3 2006-03-14 20:08:22

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

Re: textile and definition lists?

What is this “version 2” you refer too ?

The Textpattern’s Textile is called version 2.0 beta (from some time yes…).

Offline

#4 2006-03-14 21:00:26

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,609
Website

Re: textile and definition lists?

I saw some similar notation in this older forum post from 2004 but couldn’t find it in the current classtextile.php nor in the new 2.0 beta from zem. Is it likely to be included in the 2.0 version? That would be wonderful.

I for one use dl-lists quite often, mostly in pairs but sometimes in triplets with a definition, a dd img and dd text. There’s a nice example for instance in cederholm’s “bulletproof web design”.

Thanks for the notation examples — the trickier question is how would they work in combination? Like this maybe?

dl. term:(class)definition

And how would they work for my ‘triplet’ example above? In the notation there is always dt:dd but AFAIK several dd’s are allowed after a dt. How are they separated from one another, with another : (colon) or perhaps a ; semi-colon? In Brad Choate’s MT manual example the example for dl-lists is not quite clear. It looks like they might be separated with a semi-colon but on the other hand the example might just happen to include a normal semi-colon as punctuation. So maybe?

dl. term:definition1;definition2

And the combination of all of these?

dl. term:(img)[!image.jpg!];(text)definition

(I presume without the square-brackets the image tag would not work as there are no spaces).

These are just guesses, I really do not know.


TXP Builders – finely-crafted code, design and txp

Offline

#5 2006-03-16 03:08:41

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: textile and definition lists?

That is an unofficial hack/modification, which is why you’re not seeing it in the distributed Textile. Brad Choate created his own version of Textile, which is, again, why you’re not seeing it in the distributed Textile. Definition lists are not in either the distributed version of Textile, nor the version that this forum uses.

Offline

#6 2006-03-16 09:31:04

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,609
Website

Re: textile and definition lists?

Thanks for the info, Mary. I’ll continue writing it in (X)HTML, then. Perhaps dl-lists can be added to the “maybe someday” list for future textile generations.

All over the place one sees ul li lists with a two tier arrangement of the kind <li><strong>heading</strong><br />more text...</li> and in almost all such cases I find a definition list is more appropriate.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2006-03-16 10:09:38

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

Re: textile and definition lists?

Textile understand html. h3. My <span lang="fr">joli</span> title works fine for example.

Offline

#8 2006-03-16 10:20:22

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,609
Website

Re: textile and definition lists?

yes sure, I just write (X)HTML in the middle of the rest of the article for dl lists.

Your example should work in textile without html:

<notextile>My joli title</notextile>


TXP Builders – finely-crafted code, design and txp

Offline

#9 2006-03-16 11:03:52

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

Re: textile and definition lists?

Yep right. Well, replace it with q or any tag non existing within Textile :)

Offline

#10 2006-03-21 13:12:03

dog_biscuits
Member
Registered: 2005-10-14
Posts: 10

Re: textile and definition lists?

The problem I find with adding definition lists via (X)HTML is that textile tries to put other tags in the code (p, br) which generally play havoc with the layout.

Is there any way to stop this without disabling textile for the whole article?

At the moment, I’ve resorted to hacking the textile code to create definition lists based on the format

@ Term ~ Def1 ~ Def2

Last edited by dog_biscuits (2006-03-21 13:12:52)

Offline

#11 2006-05-09 06:22:53

bjorn
Member
From: sweden
Registered: 2004-02-24
Posts: 10
Website

Re: textile and definition lists?

To make textile ignore a row containing (X)HTML, just indent that row with one space. like so:

<dl style=“border:1px solid #666”> <dt style=“padding:0.5em; font-weight:bold; border-bottom:1px solid #999;”>term</dt> <dd style=“padding:0.5em;”>description</dd> </dl>

(added some styling to make the dl a bit clearer)

Offline

Board footer

Powered by FluxBB