Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-16 12:26:52

nejra
Member
From: Groningen
Registered: 2006-07-06
Posts: 38
Website

[textile] ID on a unordered list and class on an item

Hey people,

I try to create an outpout with textile like this:

<ul id="example_6_content">
<li class="example_6_item"><a href="#"><img src="images/ex6_1.jpg" alt="slide 1" /></a></li>
<li class="example_6_item"><a href="#"><img src="images/ex6_2.jpg" alt="slide 2" /></a></li>
<li class="example_6_item"><a href="#"><img src="images/ex6_3.jpg" alt="slide 3" /></a></li>
<li class="example_6_item"><a href="#"><img src="images/ex6_4.jpg" alt="slide 4" /></a></li>
<li class="example_6_item"><a href="#"><img src="images/ex6_5.jpg" alt="slide 5" /></a></li>
<li class="example_6_item"><a href="#"><img src="images/ex6_6.jpg" alt="slide 6" /></a></li>
<li class="example_6_item"><a href="#"><img src="images/ex6_7.jpg" alt="slide 7" /></a></li>
</ul>

But I can’t seem to create an <ul> with an ID and the <li> with classes. Is this even possible in textile? It has bothered me for the last couple of hours. Can’t seem to find a suitable answer on the forum or google.

I know how to output a list with an ID, but how can I make classes on the <li>?

*(#gallery_content) Lorum ipsum
* Test 123

Thanks for your thoughts,

Nejra

Last edited by nejra (2008-04-16 12:27:36)

Offline

#2 2008-04-16 13:26:52

bancroft
Member
Registered: 2005-09-30
Posts: 39

Re: [textile] ID on a unordered list and class on an item

I’m pretty sure it’s not possible with Textile. You could change ‘Article Markup’ to ‘Leave text untouched’ and enter it as your example.

I have to ask though why you need the classes on the li’s? if it’s purely for styling you don’t need it, just use

ul#example_6_content li{

}

Offline

#3 2008-04-18 09:24:53

nejra
Member
From: Groningen
Registered: 2006-07-06
Posts: 38
Website

Re: [textile] ID on a unordered list and class on an item

Bancroft, thanks for the quick reply. The problem is my javascript file needs the classes on the <li> to perform a carousel. I have about 12 pages with that gallery. That’s why I hoped textile could perform such an action. My knowledge of javascript isn’t that good to alter the code of the original iCarousel.

Offline

#4 2008-04-18 09:38:04

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [textile] ID on a unordered list and class on an item

As long as the lines start with a space, you can enter plain HTML instead of textile.

Offline

#5 2008-04-18 14:36:37

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [textile] ID on a unordered list and class on an item

Also you can use notextile.. (the double dot .. means it’s an extended block) so you don’t need to put an space before the start of each line.

Then, to escape from the notextile.. block, you have to start the line following that block with some textile, like p. or h[_n_]. or whatever.

I suggest you also to check the Textile Reference Manual, a great resource about Textile.

For some reason, notextile. (just one dot) doesn’t seem to be working for me on a 4.0.6 installation.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#6 2008-06-16 19:15:09

nejra
Member
From: Groningen
Registered: 2006-07-06
Posts: 38
Website

Re: [textile] ID on a unordered list and class on an item

bancroft, my co-worker changed the js coding so we are fine now!
others, thanks for the input!

ps my apologies for the way too late reply!

Offline

#7 2009-11-13 17:18:19

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Re: [textile] ID on a unordered list and class on an item

This is an old post, but a way to target a list item is to wrap it in a span.

*(list) %(list-title)Top Items%
* another item

(added bc. -Els)

Last edited by els (2009-11-13 18:30:36)

Offline

Board footer

Powered by FluxBB