Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2017-06-20 08:03:42

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,194
Website

Re: Shortcodes (as seen in rah_beacon)

@etc

Oleg, now that you have fully enabled short-tags, one-and-half Q’s …

1/ Is it expected that the form name can’t contain hyphens? I was testing this out today. The following works fine:

<txp:output_form form="xyz-image" id="xx" />

but the equivalent fails (silently):

<txp::xyz-image id="xx" />

rename the form to xyz_image works.

2/ In your checkin, I see you added a reset attribute to the @<txp:yield /> tag, if I understand the code correctly. Can you explain the usage? (like philwareham upthread, I had so far not much understanding of that tag, I need to add).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#26 2017-06-20 08:43:39

etc
Developer
Registered: 2010-11-11
Posts: 5,192
Website GitHub

Re: Shortcodes (as seen in rah_beacon)

phiw13 wrote #306044:

@etc

Oleg, now that you have fully enabled short-tags, one-and-half Q’s …

This half-ready commit is a bit forced, I was not able to sync with dev otherwise. The work continues, so don’t yet rely on it too much.

1/ Is it expected that the form name can’t contain hyphens? I was testing this out today. The following works fine:

<txp:output_form form="xyz-image" id="xx" />...

but the equivalent fails (silently):

<txp::xyz-image id="xx" />...

rename the form to xyz_image works.

Historically (before 4.6), <txp:abc_tag /> was internally transformed into abc_tag() function call. Since abc-tag is not a valid function name, hyphens were forbidden. Now we can allow them, but it would require more discipline re tag registration. Not sure about it…

2/ In your checkin, I see you added a reset attribute to the @<txp:yield /> tag, if I understand the code correctly. Can you explain the usage? (like philwareham upthread, I had so far not much understanding of that tag, I need to add).

It’s still in work, it seemed useful to me, but now I don’t remember how :-)

Edit: and many thanks for testing, btw!

Offline

#27 2017-06-20 09:08:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,194
Website

Re: Shortcodes (as seen in rah_beacon)

etc wrote #306045:

This half-ready commit is a bit forced, I was not able to sync with dev otherwise. The work continues, so don’t yet rely on it too much.

Right, just playing with it on the local server , exploring possibilities. Sure it offers possibilities to optimise my forms used to insert images, etc in the body of an article.

Historically (before 4.6), <txp:abc_tag /> was internally transformed into abc_tag() function call. Since abc-tag is not a valid function name, hyphens were forbidden. Now we can allow them, but it would require more discipline re tag registration. Not sure about it…

Oh, now that you mention it, I remember that limitation. I’m fine with it; probably just need documenting when those short-tags are finalised.

It’s still in work, it seemed useful to me, but now I don’t remember how :-)

Edit: and many thanks for testing, btw!

:-)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB