You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Customizing Blesta through template modifications.

Detecting Company

In your templates you can evaluate $system_company->id to display different information based on the company ID. The first company ID of every fresh Blesta installation is "1". If using multi-company, the 2nd company would be "2", and so on. Check the ID in the link for the company under Settings > System > Companies to determine the company ID.

A common use is using embed code like Crisp chat, or Facebook Pixel that will appear on all client area pages for a specific company only. The example below can be used in /app/views/client/bootstrap/structure.pdt for displaying content or embed code for a company with the ID "2" only.:

<?php if($system_company->id == "2") { ?>
       Your EMBED code here
<?php } ?>


  • No labels