Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-21 13:41:30

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

[textile] New test branch: multiple notelists

Following a request from Julián, I’ve added two experimental features to textile 2.2 notelists…

  1. More semantic URLs in the links from note-refs to note-defs.
  2. Namespaces for notelists.

The namespaces allow you to define which notelist a note is to appear in.

Example Usage…

h4. Examples...

French cheese production is classified under four categories, and PDO/AOC rules dictate which category(ies) each protected 
cheese may be assigned to; Fermier[#Cheese:Fermier], Artisanal[#Cheese:Artisanal], Coopérative[#Cheese:Coopérative] 
or Industriel[#Cheese:Industriel]. Of the four categories, it is the opinion of this author, that Artisanal[#Cheese:Artisanal] 
cheeses are the best available.

note#Cheese:Unrefereced. See "Appellation d'Origine Contrôlée":http://en.wikipedia.org/wiki/Appellation_d%27Origine_Contr%C3%B4l%C3%A9e (AOC) system for more details.

note#Cheese:Fermier. A farmhouse cheese, which is produced on the farm where the milk is produced.

note#Cheese:Artisanal. A producer producing cheese in relatively small quantities using milk from their own farm, but may also purchase milk from local farms.

note#Cheese:Coopérative. A dairy with local milk producers in an area that have joined to produce cheese. In larger coopératives quantities of cheese produced may be relatively large, akin to some industriel producers (many may be classed as factory-made[#Cheese:Industriel]).

note#Cheese:Industriel. A factory-made cheese from milk sourced locally or regionally, perhaps all over France (depending on the AOC/PDO regulations for specific cheeses).

notelist:α+. Cheese

You can have as many notelists as you like.

Here’s how to try this out…

  • Install a test copy of textpattern on a localhost site.
  • Download the zip
  • Open the zip and over-write your textpattern installation’s classTextile.php with the one from the zip.
  • Try out the new feature.
  • Let me know (below) how it goes.

Steve

Offline

#2 2011-01-26 19:11:59

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

Re: [textile] New test branch: multiple notelists

Thanks, netcarver!
I’ve been testing this feature (who’s that genius who shyly suggested this feature?) and so far, it looks good and it works good, rock solid.

I’ve discovered (well, I should have expected for this) that standard Textile functionality (like adding classes or ids) is also integrated with the “components” (this are: the notelist, the note references, the note definitions) of this feature.

[(#some_id)Chesse:Fermier]

[(some_class)Chesse:Artisanal]

notelist(#cheese):a+. Cheese.

I’ve some comments regarding the output markup (nothing technically wrong, just some ideas to share), but I’ll head to the textile IRC channel to share/discuss and distill them before posting them here.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB