Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-04-04 11:33:51

eritropel
Member
From: Hamburg
Registered: 2009-08-27
Posts: 26

no parameters in cbe_output_form

Hi,

Sounds great, but I dont get any parameters in the output…

This call is in the article text:

<txp:cbe_output_form form="HTML-BLOCK" ELEMENT="section" ID="teaser" CLASS="container row">
some content...
</txp:cbe_output_form>

This is my form “HTML-BLOCK:

<<txp:variable name="ELEMENT" /> id='<txp:variable name="ID" />' class='<txp:variable name="CLASS" />'>
<txp:yield />
</<txp:variable name="ELEMENT" />>

and this the generated HTML:

	<p>
< id='' class=''>
  </p>
	some content...
	<p>
</></p>

What is wrong?

(textpattern 4.5.5)

Edit:
Is it necessary to define the variables at first?

Offline

#2 2014-04-04 11:46:06

eritropel
Member
From: Hamburg
Registered: 2009-08-27
Posts: 26

Re: no parameters in cbe_output_form

OK – using “notextile.” will clear the not needed paragraph tags, nevertheless the parameters would not displayed appear…

Last edited by eritropel (2014-04-04 11:49:53)

Offline

#3 2014-04-04 11:51:14

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,261

Re: no parameters in cbe_output_form

I’ve complemented my answer in the cbe topic while you moved your post. Yes, define variables first.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2014-04-04 12:02:34

eritropel
Member
From: Hamburg
Registered: 2009-08-27
Posts: 26

Re: no parameters in cbe_output_form

uli wrote #280076:

[…] Yes, define variables first.

hmm… Did it, but the Problem is still the same…

Offline

#5 2014-04-04 12:08:27

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,261

Re: no parameters in cbe_output_form

Two ways to excellently stab in the dark:

Try different variable names.
Remove the “outer” HTML code and try to output mere variables.

Last edited by uli (2014-04-04 12:09:01)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2014-04-04 12:29:30

eritropel
Member
From: Hamburg
Registered: 2009-08-27
Posts: 26

Re: no parameters in cbe_output_form

Thank You Uli! Now it works.

1. There is no need to define the vars first.
2. Variables/parameters will not work, when in uppercase (like ELEMENT) or when they contain any hypen (like p-element)

Offline

#7 2014-04-04 12:56:17

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: no parameters in cbe_output_form

What you are trying to do is more likely

<txp:<txp:variable name="ELEMENT" /> id='<txp:variable name="ID" />' class='<txp:variable name="CLASS" />'>
<txp:yield />
</txp:<txp:variable name="ELEMENT" />>

(Note the <txp:<txp... at the beginning and </txp:<txp:... at the end)
Not tested, but I am pretty sure that the parser won’t understand.

Back in a while, after some tests.

Ok, already back after a few minutes.

First of all, I didn’t realize that <section> is a valid HTML tag and made a confusion with <txp:section>.
Then, I found – and that was a surprise – that although you define your parameters in uppercase, you have to use them in lowercase. (and I have to clean my glasses, you wrote it just above)

This should work :

<<txp:variable name="element" /> id='<txp:variable name="id" />' class='<txp:variable name="class" />'>
<txp:yield />
</<txp:variable name="element" />>

Finally, the parser perfectly understands <txp:<txp:variable name="element" />... (that was a surprise too) but it is not the point here.

Last edited by CeBe (2014-04-04 13:23:00)

Offline

#8 2014-04-04 13:10:25

eritropel
Member
From: Hamburg
Registered: 2009-08-27
Posts: 26

Re: no parameters in cbe_output_form

Thank you CeBe. This is a very helpfull plugin an I’m now able to use it. :-)
great!

Offline

Board footer

Powered by FluxBB