Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2008-11-07 17:33:17

kyber
New Member
Registered: 2007-07-29
Posts: 7

Re: [superseded] rah_output_section_form

sthmtc wrote:

i’m not sure if i’m getting this right… but isn’t this going to be obsolete with 4.0.7?
i thought that with the new tag parser you could do:
< txp:output_form form=“section_<txp:section />” />

Indeed you can and I have done so (I am running on latest SVN).
There is no error if the form does not exist.

Stuart

Last edited by kyber (2008-11-07 17:35:36)

Offline

#17 2008-11-15 20:44:25

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

Re: [superseded] rah_output_section_form

Gocom wrote:

Probably coming this week ;)

Any chance of category support soon? (Damn I need to learn how to write my own plugins)

Doug.

Offline

#18 2008-11-15 21:10:30

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_output_section_form

douglgm wrote:

Any chance of category support soon?

New version, 0.3 up of rah_output_section_form. Changelog:

  • Added attribute: type.
  • Added category support.

More info and downloads

douglgm wrote:

Damn I need to learn how to write my own plugins

That requires programming skills, if you don’t like it (PHP etc coding), I would advice, may not. It’s pain if you don’t like it ;)

Last edited by Gocom (2008-11-15 21:13:17)

Offline

#19 2008-11-16 20:04:06

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

Re: [superseded] rah_output_section_form

Many thanks for that, greatly appreciated – just need to re-work the site I’m working on!

As for writing plugins, I’m not afraid of a bit of coding – I just need a spare five minutes to get my heard round them!

Doug.

Offline

#20 2009-11-27 15:32:57

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: [superseded] rah_output_section_form

I use this plugin a whole lot without any issues, but I’ve finally found some wonky behavior. It may be caused by something else; if the solution isn’t obvious, would you be willing to let me know how I can begin troubleshooting this?

Here’s what is going on: In my default page template, I have a tag like this:

<txp:rah_output_section_form prefix="_aside-" default="_aside"/>

This pulls in the _aside form for each section, or the default _aside form for sections without a form by that name. Works.

But this site is also using a dedicated search section called “search”. That’s the section where I’m getting wonky behavior. For the “search” section, I don’t want to output an _aside form, so I created a form called _aside-search containing only an HTML comment. When I navigate to the “search” section without a search, that’s the form I get. Here’s the tag trace:

<txp:rah_output_section_form prefix="_aside-" default="_aside"/>
	[SQL (0.000143051147461): select Form from txp_form where `name` = '_aside-search' limit 1]

I get the same results on searches that return results. But if I search on a term with no results, this tag can return a variety of forms.

Let’s search for “monkey”, a term that doesn’t appear on the site. On the search page I now see the default _aside form; here’s the tag trace for that:

<txp:rah_output_section_form prefix="_aside-" default="_aside"/>
	[SQL (0.000265121459961): select Form from txp_form where `name` = '_aside-authors' limit 1]
	[SQL (0.000231981277466): select Form from txp_form where `name` = '_aside' limit 1]

Suddenly, the tag thinks I’m viewing the “authors” section, even though the url is mysite.tld/search?q=monkey. Everything else on the page belongs to the “search” section.

Wait. It gets stranger. Let’s search for “Monkey”, with a capital M. Now the search page is outputting a different _aside form, this time the one that goes with the “about” section:

<txp:rah_output_section_form prefix="_aside-" default="_aside"/>
	[SQL (0.000307083129883): select Form from txp_form where `name` = '_aside-about' limit 1]

Any idea what’s going on here? Thanks for this awesome plugin!

Offline

#21 2009-11-27 17:04:29

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_output_section_form

johnstephens wrote:

Any idea what’s going on here?

Do not know. The plugin just gets the section name directly from Textpattern. And she tells lies apprently.

What <txp:section /> outputs if you place it just before the <txp:rah_/> tag? Oh, and does the tag happen to be inside an article form? Full tag trace might come handy.

Offline

#22 2011-06-12 07:45:59

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,248
Website GitHub

Re: [superseded] rah_output_section_form

Just a thought: how about a suffix attribute too?

It makes for well-sorted form lists when you use the tag a few times on a page for different purposes, e.g. main_{section-name} and main_{section-name}_js or if you quickly want to test alternate variants such as main_{section-name}_alt.

For the moment I patched a version of your plugin to do that, which I can send you if you like (although I hardly think you need it).


TXP Builders – finely-crafted code, design and txp

Offline

#23 2011-06-13 07:18:28

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [superseded] rah_output_section_form

jakob wrote:

Just a thought: how about a suffix attribute too?

Well, why not :) Suffix away with v0.4. Changes:

  • Added: txp:yield support.
  • Added: suffix attribute. Thank you for the suggestion Jakob.
  • Added: Now caches the forms.

More info and downloads

Offline

#24 2011-06-13 12:09:07

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,248
Website GitHub

Re: [superseded] rah_output_section_form

Cool, thanks. I’ll put into effect very soon and holler should there be a problem.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB