Categories > TinyButStrong general >

noerr question

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Michaelsen
Date: 2005-11-22
Time: 19:09

noerr question


Hello there,

Is there anything wrong with this code?

[CODE][onload;block=table;when [var.add]==1;noerr;comm] [/CODE]

Because it is giving me this error:

[CODE]TinyButStrong Error (Merge PHP global variables): Can't merge [var.add] because there is no PHP global variable named 'add'. This message can be cancelled using parameter 'noerr'.
[/CODE]

Or do I have to always set a value for var.add on php side no matter what? I thought the above code would work only when I have var.add set. This would be nice.

I really appreciate any help, thank you.

- Michaelsen
By: Skrol29
Date: 2005-11-22
Time: 20:04

Re: noerr question

Hello,

In your snippet, parameter "onerr" applies to the [onload] block, not the Var Fields.
It should be:

[onload;block=table;when [var.add;noerr]==1]

And byt the way, parameter "comm" is uselless here because this parameter also applies for TBS Fields.
By: Michaelsen
Date: 2005-11-22
Time: 21:43

Re: noerr question


Sorry about that Skrol29.

And thank you for the clarification, you're great.

- Michaelsen
By: Michaelsen
Date: 2005-11-26
Time: 22:08

Re: noerr question

If you allow me to yet ask one more thing about this subject.

Is it ok to use this same code behavior inside TBS?

[onload;block=table;when [var.add;noerr]==1]

Because as far as I'm using it now this really can speed things up (and I mean up), specially now with Dreamweaver 8.

Can I use it largely?

One last question, is the following code considered a subtemplate?

[onload;block=table;when [var.add;noerr]==1]

Thank you again!

- Michaelsen
By: Skrol29
Date: 2005-11-28
Time: 01:45

Re: noerr question

Hello,

This is not subtemplate. Subtemplate is when you use parameter "file", and sometimes "script" or more rarely "onformat".

This is called automatic blocks. You can use them several times (I don't know what you mean by largely, but less than 10 is without problem) but this technic is more optimized if you groupe blocks using a common suffix. This is explain in the manual at the "Conditional display overview" chapter.
By: Michaelsen
Date: 2005-11-28
Time: 20:55

Re: noerr question

Hi again,

But how do I make this without the onload method?

[onload;block=p;when [var.display]=1]

Would be something like this?

[var.display;block=p;when [val]=1]

Thats why I'm in the onload method yet.

I believe I'm missing the point.

Regards,

- Michaelsen
By: Skrol29
Date: 2005-11-29
Time: 00:17

Re: noerr question

Hello,

Sorry I was probably not clear...
Automatic blocks [onload] and [onshow] are ok for your purpose.
They are done for that.
But if you intent to use them a lot, just think about optimize their usage.
You can optimize them by given them a suffix to their names (see the manual), such grouped blocks will be exclusive, so it is more easy for TBS to process them.
By: Michaelsen
Date: 2005-11-29
Time: 03:50

Re: noerr question


Hi Skrol,

Ok then, I'll read this part of the manual again and work on that.

Cheers!!

- Michaelsen