hi,
I'm having issues with the If statement & the presence of an equals sign in the &then attribute, this does not work:
[[!If? &subject=`[[+loginfp.errors]]` &operator=`!empty` &then=`<div class="inline-error">[[+loginfp.errors]]</div>` ]]
this does:
[[!If? &subject=`[[+loginfp.errors]]` &operator=`!empty` &then=`<div class"inline-error">[[+loginfp.errors]]</div>` ]]
The content page this is on is just blank if I leave the equals sign in there. I have tried to put the error message in it's own chunk, but I get the same error.
Does anyone know how [is it possible?] to escape characters in the If statements??
using Revo 2.1.3
-thanks
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
You should be able to put the HTML with the equals sign in a chunk and use this:
[[!If? &subject=`[[+loginfp.errors]]` &operator=`!empty` &then=`[[$ErrorChunk ]]`
There may be a better way.
[ed. note: BobRay last edited this post 15 years, 1 month ago.]
I did try that - no dice....
your syntax is a little out of order... &then=`[[$ErrorChunk` ]] should be &then=`[[$ErrorChunk]]`
;)
Trying to find the syntax to use if as a modifier... maybe something like:
[[+loginfp.errors:If?:&subject=`[[+loginfp.errors]]`:&operator=`!empty`:&then=`<div class="inline-error">[[+loginfp.errors]]</div>` ]]
dunno, havn't found the correct syntax to test it yet..
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
Sorry, fixed above. I would be inclined to just do this:
<div class="inline-error">[[+loginfp.errors]]</div>
But I think you could also check for the error in a posthook and set another placeholder with the code above if there's an error.
The inline-error class has a bunch of padding and background color to make it look like a dialog box [sort of] so it can only be present on an error or else it throws the rest of the layout off...
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
☆ A M B ☆
- 3,141 Posts
What about this?
[[!+loginfp.errors:notempty=`<div class="inline-error">[[!+loginfp.errors]]</div>`]]
(Note that I'm calling the placeholders uncached - am assuming it is being set based on a request and you'll need it to be processed every request)
Hmmmm exactly the same problem... the equals sign is causing problems.
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
This is a tough one. Try this (chunk uncached):
[[!If? &subject=`[[+loginfp.errors]]` &operator=`!empty` &then=`[[!$ErrorChunk ]]`
And these:
[[!+loginfp.errors:notempty=`[[$ErrorChunk ]]`]]
[[!+loginfp.errors:notempty=`[[!$ErrorChunk ]]`]]
argh!
Nothing, I can get it load the error chunk, display the error, with either method [chunk or inline if] as soon as i place that equals sign, things blow up.
There has to be a bug somewhere.
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
Does the chunk display correctly with just a regular chunk tag?