Giter Site home page Giter Site logo

Comments (11)

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

From [email protected] on July 15, 2009 22:58:47

Status: Confirmed
Owner: artagesw

from textpattern.

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

From [email protected] on July 18, 2009 01:16:01

This issue was closed by r3251 .

Status: Fixed

from textpattern.

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

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.

 avatar commented on May 18, 2024

From r.wetzlmayr on March 09, 2010 03:32:24

Status: Resolved

from textpattern.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.