Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2011-01-04 22:23:22

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: [textile] Definition lists in Textile

Hi Stef/everyone,

It was great to read that definition lists are now supported by textile.

I’m using one for the first time properly and wonder if I have a case of trying to do too much and should be using HTML, or, if there is a neat step I am missing to allow me to keep using textile.

Ideally I want multiple <P> tags in a DD.

;(class#id) My DT is here
: Para No.1 of my first DD is here
? I'd like para No.2 of my first DD to be here

Am I missing some clever way to do this, or, should I switch to HTML as I am going beyond the scope of how the textile DL implementation currently works?

Thanks lots in advance, cheers, -ALan


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#38 2011-01-04 22:33:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: [textile] Definition lists in Textile

alanfluff wrote:

Ideally I want multiple <P> tags in a DD.

Hmmm, it’s kind of outside the scope of Textile’s ‘simple’ definition lists but if you wanted to cheat you could employ a similar technique to the one presented a post above yours:

  <txp:variable name="dd1">

First para of the first lorem ipsum...

dolor seti whatnot this is paragraph 2.

  </txp:variable>

; Term
: <txp:variable name="dd1" />
: Another definition here, or a second txp:var if you wish

Just depends if you like defining your paragraph content above the place you’re going to use them in the def list. If not, raw HTML will work.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#39 2011-01-04 22:37:11

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: [textile] Definition lists in Textile

Gotchya, thanks.

Glad it wasn’t me being daft and missing some other way of doing that. Will either employ that or go to HTML.

Cheers, -Alan


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#40 2011-06-26 10:09:47

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: [textile] Definition lists in Textile

Now I written a new article Das <abbr/> – Eine classTextile.php-Erweiterung (in german at moment, but the english came back soon!) for install the extensions in file classTextile.php

New:
  • without dl-list (is since TXP v4.3.0 installed)
  • <abbr> instead <acronym>
  • lower case in the abbreviations: now you can writing AbC()!
  • you can install what do you want!

Offline

#41 2011-06-26 12:35:34

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Definition lists in Textile

Hi lythande,

you might be interested in this article from the weblog. Textile is being (rather slowly at the moment) developed as a separate project from Textpattern now. The main textile repository is currently on github but there are plans afoot to move it to its own domain. You are welcome to post issues to the github issue tracker but please read through the existing issues first as acronym / abbr support is on the developer’s radar already. You are also most welcome to submit pull requests for changes you have made to the code that you feel should be in textile core.


Steve

Offline

#42 2011-06-26 18:57:49

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: [textile] Definition lists in Textile

Much thanks, Steve- at mo Im reading the posts at github :-)

Edit: Now I tried to read anythings, but I can’t figure out how works github and how I can using it :(
(and english is not my language….)

Last edited by lythande (2011-06-26 21:52:48)

Offline

#43 2012-04-27 12:44:39

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Definition lists in Textile

Do some of you definition-list users want to try out Redcloth style definition lists?

The branch at github.com/netcarver/textile/tree/redcloth-dl allows you to define single-level definition lists in the Redcloth syntax to allow better import of textile sources from Redcloth. This allows you to do things like…

- coffee := Hot _and_ black
- tea := Also hot, but a little less black
- milk := Nourishing beverage for baby cows.
Cold drink that goes great with cookies. =:

As usual, you can add attributes & modifiers to list items, so…

-(hot) *coffee* := Hot _and_ black
-(hot#tea) _tea_ := Also hot, but a little less black
-(cold) milk := Nourishing beverage for baby cows.
Cold drink that goes great with cookies. =:

Please try this out and let me know how it goes.


Steve

Offline

#44 2012-04-27 19:15:03

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

Re: [textile] Definition lists in Textile

My 2 cents
The problem here is that if you use := notation, you can’t add many dd for each dl, which often comes useful, am I wrong?

Offline

#45 2012-04-27 21:01:19

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Definition lists in Textile

Hi Manaus,

Thanks for trying this out & yes, that is correct — this notation does not allow multiple dds for each term as the redcloth syntax doesn’t support it (as far as I can tell). This addition is meant to add redcloth compatibility in order to make it easier to bring over and render redcloth documents more easily, not to extend their format1. Also, redcloth format does not allow for nested definition lists.

If you want multiple dd fields you can use the existing PHP-textile definition list syntax…

; Linux
: An open-source version of the UNIX operating system.
: The free Unix workalike created by Linus Torvalds and friends starting about 1991.

…giving…

<dl>
<dt>Linux</dt>
<dd>An open-source version of the <span class="caps">UNIX</span> operating system.</dd>
<dd>The free Unix workalike created by Linus Torvalds and friends starting about 1991.</dd>
</dl>

1 That said, I have support for class/id/styles on each element as it is pretty easy to do in php-textile.

Last edited by net-carver (2012-04-27 21:03:43)


Steve

Offline

Board footer

Powered by FluxBB