Comments (11)
From [email protected] on July 12, 2009 19:16:33
Disclaimer: I'm not a TXP developer, just another TXP user.
I've seen something similar in Django, where you can create that kind of wrapping
estructures...
IMHO, they are a little cumbersome, although they prove useful.
This kind of idea could go in tandem with this proposal (also inspired in Django): http://forum.textpattern.com/viewtopic.php?pid=178734
from textpattern.
From r.wetzlmayr on July 12, 2009 22:58:59
<txp:variable /> can be used to provide such functionality.
Labels: Component-Core Priority-Low Type-Enhancement
from textpattern.
From [email protected] on July 12, 2009 23:48:36
This is analogous to the <r:yield> tag in Radiant. I agree it would be a useful addition. Although <txp:variable
/> can be used to achieve this result, it is more cumbersome and requires naming the variable (which requires
awareness of potential name collisions). So, although <txp:variable /> is a more general solution, this idea has
merit as a more targeted solution to the specific problem of parameterizing forms.
from textpattern.
From [email protected] on July 15, 2009 22:58:47
Status: Confirmed
Owner: artagesw
from textpattern.
From [email protected] on July 16, 2009 06:03:25
hi artagesw,
not sure what means the new status ("Confirmed").
Will you be working on adding this as a new feature?
Maybe we can do some little more brainstorming on this, although no doubt you
probably grasped the whole concept (and how to implement it on a "textpatternish
way") better and clearer than me.
The "paremeterizing" concept is unfamiliar for me
First, both wet and you says that <txp:variable /> can be used to provide such
functionality.
Could you, please, share how to do it?
This will certainly make things clearer to understand (even if a solution using
<txp:variable /> may be cumbersome).
Seconda, there is also this post on TXP forum: http://forum.textpattern.com/viewtopic.php?id=31191 I think that FireFusion is suggesting some way to create variables directly from
<txp:output_form /> attributes, so to avoid the hassle of writing <txp:variable />
somewhere (one line above?) the <txp:output_form />, so when the "outputted" form is
called, then the variable already exists and can be used as a switch inside the form.
In other words:
<txp:variable name="foo" value="1" />
<txp:output_form form="my_form" />
Form "my_form":
<txp:if_variable name="foo" value="1">
do this
<txp:else />
do that
/txp:if_variable
That may be seen as a little cumbersome, but at least, it currently works, and seems
it's somehow inline with the "textpatternish" way of doing things.
FireFusion may be suggesting something like
<txp:output_form form="my_form" var="foo" value="1" />
to create txp:variables "on the fly".
That looks tidier... but then, it may open a can of worms and questions and
suggestions ("let's add this to every TXP tag!").
I don't like this last example too much.
But, both examples could lead to another attempt to create a "One form to rule them
all", where just one form with lot of conditionals have every chunk of code on it...
Then, another idea: txp:output_form as a container tag, which may sound really
silly, as txp:output_form calls a form, so why would anyone want to use it as a
container tag?.
Maybe, the contained stuff can only be one or some txp:variable and can act like
parameters on functions (parameterizing?). But being wrapped by txp:output_form, this
variables will only work inside the called form (and then, destroyed), so to avoid
name collisions?.
This can also lead to the "one form to rule them all" approach.
Anyway, I'm just thinking loud. I'm not a programmer and I'm probably be talking of
obvious things that you already considered.
from textpattern.
From [email protected] on July 16, 2009 08:28:17
"FireFusion may be suggesting something like
<txp:output_form form="my_form" var="foo" value="1" />"
Actually it would be more like this.
<txp:output_form form="my_form" var_name="value" />
That way you could define many variables in one output form.
<txp:output_form form="my_form" var_name="value" var_name2="value" var_name3="value" />
from textpattern.
From [email protected] on July 16, 2009 11:15:04
@Julian: "Confirmed" status means the proposed feature has been recognized as having merit and has been
accepted (though not necessarily scheduled) for future implementation.
from textpattern.
From [email protected] on July 18, 2009 01:16:01
This issue was closed by r3251 .
Status: Fixed
from textpattern.
From [email protected] on August 24, 2009 17:33:42
Hi Sam,
after doing some testing of this new feature (txp:output_form as container and
txp:yield) I've some ideas and comments to share with you and the TXP team.
Also, I've been already informed about a txp:scope thing on the pipeline ;) that may
come in handy, although at a first glance (must admit I didn't go into the details of
txp:scope and its usage) I ask if we really need another tag for managing the scope
of TXP variables (something that is, without any doubt, desirable) or if we may come
up with other alternative.
But before going on, I would like to know if this is the place to discuss it, or
should I do it on TXP forum, on a new issue or maybe joining a mailing list.
Thanks.
from textpattern.
From [email protected] on August 24, 2009 17:53:23
Well, since this issue has been closed, I think it would be better to discuss related ideas in a forum post or on
the txp-dev mailing list.
from textpattern.
From r.wetzlmayr on March 09, 2010 03:32:24
Status: Resolved
from textpattern.
Related Issues (20)
- wrong category 2 assigned to Welcome article HOT 1
- Update HISTORY and/or README.md that Textpattern will not run as expected with PHP 8.3.0 under some circumstances. HOT 2
- Prep work and actions for MySQL 8.3 support
- Progressively get rid of MD5 HOT 2
- jQuery 4.0.0 is coming soon HOT 2
- How to customize <title></title> HOT 1
- how to install EDITOR HOT 2
- Safari 15.7 / iOS 15 preview text view not loading HOT 2
- Show spam form action (or rather page URL) is not updated on clear search HOT 6
- Function strftime() has been DEPRECATED as of PHP 8.1.0 but is still used in safe_strftime HOT 8
- Textpattern 4.9.0 release flight plan HOT 17
- Incorrect layout on the plugins panel HOT 3
- RFC: Textpattern 4.9 is final 4.x release; Textpattern 5.0 next 'big' release HOT 6
- Edit file / missing file: non functional “delete” button
- Edit file / missing file: SQL error and warning when pressing ‘save’ HOT 1
- Edit file panel - some HTML & layout issues HOT 1
- utf8_en/decode() are deprecated in PHP 8.2 HOT 7
- PHP 8.4 compatibility tracking HOT 4
- Articles with status 'Hidden' do not return a `404 Not Found` response when requested but a `200 OK` HOT 1
- RFC: would `htmz` solve any problems? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textpattern.