Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2018-06-28 16:56:52
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Textpattern shortcode syntax like WP shortcode syntax
Is it possible to consider changing the syntax of shortcodes to adopt that of WP, with brackets?
<txp::media_file category="" filename="" sha256="" />
would become [media_file category="" filename="" sha256="" ]
Syntax alias of the original ???, simpler for the client.
Offline
Re: Textpattern shortcode syntax like WP shortcode syntax
Given that brackets are sometimes used in not-shortcode fashions (e.g. [123 comments]
), how would we tell the difference?
Online
Re: Textpattern shortcode syntax like WP shortcode syntax
Hi Jean-Pierre & Oleg ;)
May be a possible solution: use of 3 brackets (inspired from the Gusto syntax https://css-tricks.com/prototyping-in-the-browser/):
[[[media_file category="" filename="" sha256=""]]]
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Textpattern shortcode syntax like WP shortcode syntax
I have to admit that changing the syntax would create a lot of work for me now. If there is a consensus I’d accept it but especially after GDPR I’m sure that some sites might also already be using the existing syntax in their articles
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Textpattern shortcode syntax like WP shortcode syntax
Pat64 wrote #312867:
[…] (inspired from the Gusto syntax https://css-tricks.com/prototyping-in-the-browser/):
In fact, it comes from CodePen.
From the CSS tricks article linked:
What’s that weird syntax with all the [[[ ]]]? That’s the HTML Include syntax for CodePen.
Anyway, I’m not sure that would really make users job easier (?)
And I also think that short tags are already in use in sites in production. It seems strange to me to ask to change this now; there were some bêta’s versions, and nobody complained before as far as I know.
Last edited by NicolasGraph (2018-07-05 19:02:42)
Offline
Re: Textpattern shortcode syntax like WP shortcode syntax
Respectfully, please add my -1 to the consensus.
Offline
Re: Textpattern shortcode syntax like WP shortcode syntax
gaekwad wrote #312871:
Respectfully, please add my -1 to the consensus.
And mines (-2).
The bracket []
solution would confuse textpattern syntax (code that you use in an article to call / include something) with textile syntax (code that is used to format something).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Textpattern shortcode syntax like WP shortcode syntax
Sorry guys.
I didn’t read carefully this post and I understood “Add an alternative to TXP tags, a kind of shortcode syntax like WP ones for article text contents only”.
Please, don’t hurt me ?.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#9 2018-07-06 12:56:02
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,310
Re: Textpattern shortcode syntax like WP shortcode syntax
Pat64 wrote #312867:
[[[media_file category="" filename="" sha256=""]]]
Can’t that be accomplished with rah_replace/smd_wrap/preg_replace?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline