Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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 withtitle,alt,width,heightand 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.
- 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
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
Re: Textile syntax for textpatterned content
I disagree. I’ll be back on this to explain why.
VC3 :: weblog :: my wishlist
Offline
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
Re: Textile syntax for textpatterned content
VC3 :: weblog :: my wishlist
Offline
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>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
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)
VC3 :: weblog :: my wishlist
Offline
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
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.
VC3 :: weblog :: my wishlist
Offline
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
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)
VC3 :: weblog :: my wishlist
Offline
Re: Textile syntax for textpatterned content
wet’s idea… that’s what textpattern needs definitely and as soon as possible:
"blabla":23"":23
I am using zem’s plugin heavily and I think that’s ridiculous.
++m
Last edited by Michael (2005-12-27 16:00:32)
Offline
#14 2006-05-09 17:20:22
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: Textile syntax for textpatterned content
This is brilliant! HAS to happen. Not using any tag in articles is what we should go to. My additional suggestion go as follows :
textile already allows !path/to/image(alt text)!. That needs to be extended : !23t alt! would give you a thumbnail of image 23 with automatic alt completion. !>23t alt title! … well you guessed it. So we would have
** ID (with t for thumbnail)
** < and = and > for the alignment / nothing means no styling
** alt for filling alt with text submitted in image tab / nothing means empty alt
** title same/nothing means no title
** linked in case of thumbnail, opens the original image in same window // alternatively, we could also use !23t!:!23!
** popup opens in a popup
** I thought I’d suggest for a caption attribute, but I guess some javascript and the title attribute could do.
I’ve never really used files before so I couldn’t really tell what those need.
I’m prepared to collaborate alright!
Edits : corrected textile syntax.
Last edited by guiguibonbon (2006-05-09 20:31:32)
Offline
#15 2006-05-10 04:54:45
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Textile syntax for textpatterned content
Textile is used for things other than Textpattern (WordPress and other cms’, this forum…), existed before it too, so it is specifically made “general purpose” on, well, purpose. :)
The nice thing will be that once the markup switching stuff is available (it’s in crockery’s svn), someone could create this special version of Textpattern-specific Textile as a replacement. :)
Last edited by Mary (2006-05-10 04:55:20)
Offline
