Introduction

B@SE is Neto by Maropost's templating language. We use B@SE in our HTML templates to print out data from the database.

For example, you can use the [%thumb_list%] B@SE function to print out a list of your products and various details about them.

B@SE has two different types of tags, Functions and Data tags.

Data Tags

Data tags are simple, stand-alone tags which print a single value from the database. For example, if you want to print the name of your category on the category page, you would use the [@content_name@] tag, which would output something like:

Waterslides

Not all data tags can be used everywhere. Some are exclusive to certain pages and even certain Functions.

For example, you can use the [@SKU@] data tag to print the SKU of a product on a product page. This tag, however, would not display anything on a category or content page. This is because a content page does not have a SKU!

Function Tags

Function tags are more complicated than data tags. They are often configurable through parameters and they can often output more than one value.

If you want to print a list of the names all products in a category with the ID of 100, you can do this with the [%thumb_list%] function, coupled with the [@name@] tag to print the product name.

<ul>
    [%thumb_list type:'products' category:'100'%]
        [%param *body%]
            <li>[@name@]</li>
        [%/param%]
    [%/thumb_list%]
</ul>

The Anatomy of a Function

There are three components to a function: The function, the inline parameters and the parameters.

[%thumb_list
type:'products'
category:'100'
%]

[%param
header
%]

<ul>

[%/param%]

[%param
*body
%]

<li>
[@name@]
</li>

[%/param%]

[%param %]

</ul>

[%/param%]

[%/thumb_list%]

Function Tag
Function Tags pull data from the database. They are configurable through parameters and unlike data tags they can output more than one value.
Inline Parameter
Inline parameters are quick ways to configure your function. All inline parameters can be used as block parameters as well.
Block Parameter
A block parameter is another way to configure your function. They allow you to use other functions, tags and logic within them, unlike inline parameters. They need to be closed like HTML tags
Param Header
The header parameter displays content before the output of the function.
Param Body
The body parameter determines the layout of the function. This only works on certain functions.
Data Tag
Data tags are simple, stand-alone tags which print a single value from the database.

Was this article useful?

Be notified when this page is updated. Optional.