meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

how_to_strip_html_from_blesta_titles [2022/12/10 15:34] – created sgrafhow_to_strip_html_from_blesta_titles [2022/12/10 16:10] (current) sgraf
Line 1: Line 1:
-<markdown> </markdown>+====== How to strip HTML from the Blesta titles? ====== 
 + 
 +<markdown> 
 + 
 +So if your cool new template or theme has like <b>**BOLDER**</b> or a different colour they look horrible in the page title for your website but look cool on your website. 
 + 
 +To get around this we need to find the title: 
 + 
 +    <title><?php echo $this->Html->ifSet($system_company->name) . ' ~ ' . $this->Html->safe($this->Html->ifSet($page_title) ? $page_title : '');?></title> 
 + 
 +Replace it with: 
 + 
 +    <title><?php echo $this->Html->safe(($this->Html->ifSet(strip_tags($page_title)) ? strip_tags($page_title) . ' | ' : '') . $this->Html->ifSet($system_company->name));?></title> 
 + 
 +This means your page titles look neat and great for SEO and Google, etc but your theme or template looks sexy as hell. 
 + 
 + 
 + 
 + </markdown>