Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-09-12 06:05:09

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Textile syntax for textpatterned content

I’d like to propose an addition to Textile allowing a shorthand for site-internal links.

Textile should contain a method of creating links to articles and files, as well as for calling images and thumbnails out of the textpattern repository, thus reducing the need for plugins like zem_link or upm_image.

One possible solution: Any numerical reference following Textile’s standard notation of links and images will be interpreted as an article’s or image’s id.

E.g.

  • !23! would insert the image with id #23, accompanied with title, alt, width, height and other HTML attributes
    <notextile>
  • <code>an article; would link to article #23
  • <code>&; would link to article #23, replacing the ampersand (or any other suitable special char) with the article’s title
    </notextile>
  • additional syntax would be required to cover thumbnails and files.
  • (class), (#id), (class#id), {style}, [language] modifiers would apply.
Pro:
  • Content authors could resort to textile and are not exposed to tags.
  • Reduce errors stemming from incorrectly nested <txp>-tags.

See also here.

What do you think? Any suggestions for backwards-compatible syntax?

//w&

Offline

#2 2005-09-12 09:38:20

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

Re: Textile syntax for textpatterned content

Agreed, this would be very very nice.

One little thing: maybe "":23 and not "&": ?

Last edited by Jeremie (2005-09-12 09:39:41)

Offline

#3 2005-09-12 14:54:42

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Textile syntax for textpatterned content

Lovely idea.

Offline

#4 2005-10-26 18:32:26

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Textile syntax for textpatterned content

I disagree. I’ll be back on this to explain why.

Offline

#5 2005-10-26 18:58:14

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Textile syntax for textpatterned content

Gets my vote. Better integration of textile with the overall system would be very welcome. I hate having to insert < txp:> tags to be able to reference things by id. Textile is just so much cleaner, and easier to read in the textarea.


Shoving is the answer – pusher robot

Offline

#6 2005-10-27 01:14:31

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Textile syntax for textpatterned content

Offline

#7 2005-10-27 04:30:45

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Textile syntax for textpatterned content

Great idea, although I do not consider it as a proposal contrary to mine, as it does not reduce markup clutter to an amount which is legible for the technically uninitiated.

I’d like you elaborate a bit on the design decisions you have chosen.

Which syntax is used for anchor text in etz_peudo? Why have you chosen to separate references by id from the ones referenced by name, in contrast to zem_link and upm_image which both treat numerical references as ids?

I suppose, content authors would use either one of those two markup:

Textile:

<notextile>
  • get it!
  • read on or {txp:zem_link href=“1” title=“read on” /}
    </notextile>

etz_pseudo:

<notextile>
  • txp://this/image/1
  • “get it!”:txp://this/file_id/1
  • “read on”:txp://this/article/1
    </notextile>

Is this correct?

Offline

#8 2005-10-27 11:02:54

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Textile syntax for textpatterned content

That’s what I’ve been suggesting, only the way to include an image is <notextile>!txp://this/image_id/1!</notextile> or <notextile>!txp://this/image/logo.png!</notextile>. I wouldn’t call it “etz_pseudo syntax”, it’s a combination of etz_pseudo with Textile as we know it.

> Why have you chosen to separate references by id from the ones referenced by name, in contrast to zem_link and upm_image which both treat numerical references as ids?

At this early stage, suggestions to change the pseudo-URI syntax are welcome.

Last edited by Etz Haim (2005-10-27 11:12:47)

Offline

#9 2005-10-27 17:47:49

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Textile syntax for textpatterned content

Over all I like the pseudo syntax because I could see how it could eventually extend to powerful concepts like <code>!txp://article-image/43!</code> which could include the article-image of article 43. Links of this type could really save problems with changing url-schems or if TXP ever starts not renaming files by ID.

I think would love to see <code>!image-id!</code> however since you will never be inserting a file in an img tag. I think this is a great start I would however love to see a shorter syntax like <code> "get this":file|IDorName </code> or even <code> "get this":file[IDorName] </code> which I think increases readiability since it has less slashes.

Great idea though.

Last edited by hakjoon (2005-10-27 17:50:46)


Shoving is the answer – pusher robot

Offline

#10 2005-10-27 18:41:17

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Textile syntax for textpatterned content

Thanks for the suggestions. In order to help etz_pseudo acquire a solid design from its very beginning, please post in its own thread.

Offline

#11 2005-10-27 19:59:41

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

Re: Textile syntax for textpatterned content

Etz Haim wrote:
A counter-suggestion in the form of a plugin.
I won’t speak specifically of this plugin. But this feature requested should be a core, native one.

By definition, a plugin may break in future version. A core feature shouldn’t, and has more followup and support. And this type of feature should really, really never break because it can break a whole website.

If you have a good proposal, I would suggest integrate it with TXP, and mail the hdiff patch to the dev team.

Offline

#12 2005-10-27 20:07:03

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Textile syntax for textpatterned content

My idea is to help this mature as a plugin first, and then port its desirable features to the core Textpattern distribution through a patch submission. From now on, please use this thread for anything regarding etz_pseudo and its proposed pseudo-URI schemes.

Last edited by Etz Haim (2005-10-27 20:10:36)

Offline

Board footer

Powered by FluxBB