Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-29 17:02:37

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 700
Website Mastodon

tag builder for output forms

using the tag builder for output forms i noticed, that the pull-down menu for available forms (in v. 4.0.4 release) is mentioning only the misc forms to select from. is that intended?
i don’t have any problems with form names of other kinds (article forms work at least) when called with the output form tag.

Last edited by jayrope (2006-10-29 17:04:06)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#2 2006-10-29 18:54:29

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: tag builder for output forms

file and link forms only work properly in thier own associated tags file_download_list and linklist, if you were to call the tags normally used in those forms directly with output_form they will be out of context, the same would hold true for article versus page/column tags. Given that a user understands that context I see no problem with using output_form in those form types, I don’t think TXP will see the difference. Most users who will use that tagbuilder are not going to be as clear on the use of those forms as you or I, I can see how including them may create more confusion and work than it may resolve, IMHO.

Offline

#3 2006-10-29 19:02:04

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 700
Website Mastodon

Re: tag builder for output forms

oh i see.
i am using a lot of output forms calling article forms in pages – is that out of context, too?
i think i don’t quite understand the differences in the various form types, i am such a textpattern newbie still (since may 2006), that i probably lack understanding for the subtleties there.still i would assume, that as long as callign an article form via the output form tag is okay, so: not out of context (?)
in that case it would make sense to have them available aswell in the tag builder – or is that limited, because there’s too many cases where this would not be appropriate (like calling an article form in an article itself for instance?)

i am a little confused there, sorry.

Last edited by jayrope (2006-10-29 19:04:22)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#4 2006-10-29 23:27:27

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: tag builder for output forms

Only problem with using article form tags in output_form is that you can’t use them in page/column if TXP is rendering an article list, they won’t return anything. They will work fine in the most recent release if it is rendering an individual article, its the list versus individual article mode that gets confusing.
The different form type names are for the user to use to categorize them, TXP doesn’t look at type when it uses them.

Offline

#5 2006-10-30 00:22:13

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: tag builder for output forms

rsilletti wrote:

Only problem with using article form tags in output_form is that you can’t use them in page/column if TXP is rendering an article list, they won’t return anything. They will work fine in the most recent release if it is rendering an individual article

While I think the correct way to call an article form is by using <txp:article /> tag, it’s cool to know that we can use <txp:output_form /> to call article forms in individual article context.

rsilletti, for what you said, i pressume this is a new feature, right?

I don’t know what used to happen if you used <txp:output_form /> to call an article form prior to 4.0.4, but i remember some “issues” when trying to achieve little things with <txp:article />

For example, I have tried sometimes:
<txp:article form="title" />
And in the title article form:
<txp:title />

It worked fine for things like customizing <title></title> .
But there were some “issues”, for example, when I choose to override the chosen article form for an special article…
The override setting affected also the simple <txp:article form="title" />

So, the possibility of using <txp:output_form form="title" /> in individual-article context seems to make thing easy.

Am I right? I’m just thinking loud… :D


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#6 2006-10-30 02:46:27

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: tag builder for output forms

Using output_form for non-misc forms is not a recommended practise.

Offline

#7 2006-10-30 02:55:59

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: tag builder for output forms

Oh, I have updated just one site to 4.0.4 but haven’t tried anything yet…

I thought that when rsilletti said that “they will work fine in the most recent release if it is rendering an individual article” he was refering to something related to the new posibility of using article tags (like txp:title, txp:body) directly in the page template.

I haven’t investigated how was that new feature implemented yet (the use of article tags in page templates). So, I thought that a possible chance was calling them directly with txp:output_form instead of txp:article.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#8 2006-10-30 05:06:43

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: tag builder for output forms

When you are displaying an individual article, details that would normally be available in an article form are available in the page/column context. You can use conditionals based on article ids, article categories, ect, as well as tags such as the title tag. It makes a lot of choices available that were not before.

Offline

#9 2006-10-30 05:42:40

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: tag builder for output forms

i.e: you can put <txp:title /> directly into your page, as long as you wrap it in an if_individual_article tag (on a article list, you’d get a warning when in testing/debug mode).

Offline

#10 2006-10-30 16:21:53

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: tag builder for output forms

Cool!

That makes thing easier :)
No need for just-one-line article forms…


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB