Hello!
The problem is this: I need to output my variable anywhere in the template. The variable will receive a value from the database via a sql query. The question is: where do I need to declare this variable and how to make it so that I can display it in a template, like this: {vb: raw my_custom_variable}.
I create a product by the instructions in the core / packages folder, created a class there, etc. Tell me how to do it further so that my variable can be displayed later in the template. On the forums I found information that I need to do this, but it does not work, or I do it wrong:
$topheaderbar = 'my_data_from_database';
vB_Template::preRegister('header',array('topheaderbar' => $topheaderbar));
I really need help !!! Thank you!
The problem is this: I need to output my variable anywhere in the template. The variable will receive a value from the database via a sql query. The question is: where do I need to declare this variable and how to make it so that I can display it in a template, like this: {vb: raw my_custom_variable}.
I create a product by the instructions in the core / packages folder, created a class there, etc. Tell me how to do it further so that my variable can be displayed later in the template. On the forums I found information that I need to do this, but it does not work, or I do it wrong:
$topheaderbar = 'my_data_from_database';
vB_Template::preRegister('header',array('topheaderbar' => $topheaderbar));
I really need help !!! Thank you!
Comment