Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [textile] Definition lists in Textile
Definition lists are on the list of things to add to TXP
Hurrah! Agree Textile is not meant as a replacement for HTML, but DL’s are so often the right semantic choice, it’s slightly painful teaching non coders to use Textile’s equiv strong and H's when one knows a DL is a closer match to describe the content. I’m sure this is one case where it’s merited to add a little more to Textile armoury :)
Happy Camper. 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
Re: [textile] Definition lists in Textile
lythande schrieb:
Now you can downloading the php-file as a txt-file from my website directly: classTextile.php.txt
oops, after provider-removal I forgot to correct the link to my download on my site. Now I repair this and sorry for that!
Edit: my files for dl-list are updated, Ive “add the new classTextile.php from Bloke with my extensions” (with <abbr> instead <acronym>)
Look at the new Topic for install Extensions for classTextile.php
If you have the classTextile.php from me and wish to add this information in Textile Help – now I add this!
Edit the Informations are updated for the new classTextile.php and new dl-list NEW and is supplemented with some other useful notations.
In download-arena the article above there two files txp_article.php, one for german- and one for english-user.
If you need it for another language or wish back a information, feel free to change this! I’ve mark the new content or comment out it in txp_article.php
And if you dont use the dtj_obfuscated_email-Plugin, then comment out this. a descibtion is on the top of the file, which you download on my site.
best regards
Lythande
Last edited by lythande (2011-06-26 10:20:22)
Offline
Re: [textile] Definition lists in Textile
The syntax adopts the mediawiki system:
- semicolon for the start of a list and to specify a
<dt> - colon for a
<dd> - multiple terms and multiple definitions are permitted
- term-less definitions are also supported
- nested definitions are supported using double-semicolon and double-colon, the same way ul and ol can
- the first item can take class and id in parentheses, again just like ol and ul lists
This example flexes pretty much all of its muscles:
;(class#id) Term 1 : Def 1 : Def 2 : Def 3 ;; Center ;; Centre :: Subdef 1 :: Subdef 2 ;;; SubSub Term ::: SubSub Def 1 ::: SubSub Def 2 ::: SubSub Def 3 ::: SubSub Def 4 :: Subdef 3 : Def 4 ; Term 2 : Another def : And another : One more :: A def without a term :: More defness ; Third term for good measure : My definition of a boombastic jazz
Enjoy.
Last edited by Bloke (2010-06-07 20:54:15)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#19 2010-06-07 20:58:33
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [textile] Definition lists in Textile
Oh lovely! Thanks heaps!!
Offline
Re: [textile] Definition lists in Textile
Brilliant! Thanks to all who made-it-so!
Am I right in thinking this is available now by using a ‘dev’ build of 4.2.0, so if I want to stick to ‘production’ builds I now know this is coming in the future? Or is it ‘installable’ on top of a 4.2.0; like a plugin is? I checked out the code.google but got confused (it’s not easy to do that, sorry).
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
#21 2010-06-07 21:17:40
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [textile] Definition lists in Textile
I think we can just replace classTextile.php, right?
Offline
Re: [textile] Definition lists in Textile
alanfluff wrote:
Am I right in thinking this is available now by using a ‘dev’ build of 4.2.0
Yes. If you check out the latest SVN build (there’s one known bug with image_list which’ll be squashed very soon) from the google code area it’s essentially an entire copy of TXP that you can upload as if you grabbed an official version. If you overwrite an existing site, back up first of course :-)
However, in this instance classTextile.php is actually a completely standalone module so you could get away with just browsing the SVN repo and dowloading classTextile.php. Then just replace your existing textpattern/lib/classTextile.php with that one (backup first) and you can have definition lists now.
Caveat destructor and all the usual get-out-of-jail-free terminology accompanies these instructions, which will self-destruct in 5 seconds…
Edit: wot Els said :-D
Last edited by Bloke (2010-06-07 21:19:52)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: [textile] Definition lists in Textile
Thanks for this very useful addition. I love the <dl>.
Code is topiary
Offline
Re: [textile] Definition lists in Textile
Another fan says thanks!
TXP Builders – finely-crafted code, design and txp
Offline
Re: [textile] Definition lists in Textile
Yes. If you check out the latest SVN build…
Thanks Stef!
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
Re: [textile] Definition lists in Textile
Nice work :)
Offline
#27 2010-06-08 17:01:36
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: [textile] Definition lists in Textile
Thanks Stef ! I love definition lists :)
Offline
Re: [textile] Definition lists in Textile
Saw the svn commit for this go through and just wanted to say: Awesome! Nice work.
Offline
Re: [textile] Definition lists in Textile
hi is there a reason why the below code doesn’t render the textile for the link?:
<dd>"www.ostanlochaltan.com":http://www.ostanlochaltan.com</dd>
where as this does but adds a break?:
<dd>
"www.ostanlochaltan.com":http://www.ostanlochaltan.com
</dd>
Code display -Gocom
Last edited by Gocom (2010-06-17 20:08:45)
its a bad hen that wont scratch itself.
photogallery
Offline
Re: [textile] Definition lists in Textile
kvnmcwebn wrote:
hi is there a reason why the below code doesn’t render the textile for the link?:
<dd>www.ostanlochaltan.com;
Because Textile’s parser tries to validate the output by checking if the markup indeed should generate a link. For example it tries to avoid accidently turning words into links.
Anway, if you break the single word into parts, it will turn the link into link. An append or prepeding space should be enough:
<dd>"www.ostanlochaltan.com":http://www.ostanlochaltan.com </dd>
If not, then both:
<dd> "www.ostanlochaltan.com":http://www.ostanlochaltan.com </dd>
Or if you are using r3359 (or newer):
; Term
: "www.ostanlochaltan.com":http://www.ostanlochaltan.com
where as this does but adds a break?
Because Textile turns line breaks into HTML line breaks.
Offline