Categories > TinyButStrong general >

The MergeSpecial Function.

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Mankiy
Date: 2003-07-20
Time: 19:30

The MergeSpecial Function.

I dont understand how I use the MergeSpecial function from the description in the TBS Manual.......

would it be this way:
$headdir = "something";

$PAGE->MergeSpecial($headdir, "var");

index.tpl

File Located In: <b>[var.headdir]</b>

By: Skrol29
Date: 2003-07-20
Time: 21:57

Re: The MergeSpecial Function.

Hi Mankiy,

No that not the point of the MergeSpecial() function.

MergeSpecial() will marge all [var.*] tags, or all [tbs_include] tags or all [sys.*] tags,...
Those tags are usually merged with the Show() function. But for very specific needs, i could be intersinting to merge some of them before.

If you want to merge only one tag, then the MergeField() function is for that. It can merge any tags with any value, even var or sys tags.
By: Mankiy
Date: 2003-07-20
Time: 23:03

Re: The MergeSpecial Function.

well, I only have one [var.something] tag i need merged ahead of time......

so, would MergeSpecial be like this then?
MergeSpecial("var");
By: Skrol29
Date: 2003-07-20
Time: 23:17

Re: The MergeSpecial Function.

Yes.

Just to be more clear, if you have only one var tag, then the following issues are equilvalent :

$TBS->MergeSpecial('var') ;
or
$TBS->MergeField('var.someting',$something) ;
By: Mankiy
Date: 2003-07-20
Time: 23:24

Re: The MergeSpecial Function.

k, and one thing, im having trouble with the
tbs_include.onload;file=[var.headdir];htmlconv=no

it isnt replacing the var.headdir and when i try the mergefield, it doesnt replace it either........
By: Mankiy
Date: 2003-07-20
Time: 23:31

Re: The MergeSpecial Function.

im getting these errors:

TinyButStrong Warning (Merge PhpVar): The field [var.headdir] can not be merged because there is no corresponding PHP variable.


TinyButStrong Error (LoadFile): error when opening the file '[var.headdir]'.

yet, i am doing the MergeSpecial on both include and var, and I do have the var $headdir in the file...
By: Skrol29
Date: 2003-07-21
Time: 00:45

Re: The MergeSpecial Function.

are you sure that $headdir is a global variable, not a local variable in a function ?
By: Mankiy
Date: 2003-07-21
Time: 03:25

Re: The MergeSpecial Function.

um....
no clue...

Its located in the index.tpl file

heres how my files are set....

index.php: root file
index.tpl: root/templates file
header.tpl: root/templates/test file
By: Mankiy
Date: 2003-07-21
Time: 03:26

Re: The MergeSpecial Function.

im guessing its global....

it will probably end up being in a while loop when im done though....
By: Skrol29
Date: 2003-07-21
Time: 03:52

Re: The MergeSpecial Function.

is the variable $headdir set before the LoadTemplate() function ?
TBS needs it at this time for the file inclusion.
By: Mankiy
Date: 2003-07-21
Time: 04:52

Re: The MergeSpecial Function.

oh!!!!!!

that can be arranged, i jsut put the vars in with allt he other vars i have, which is RIGHT after the LoadTemplate Function, TY! :)