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.