<?php
	if ($this->snippet->has_name):
		$headerTag = $this->headerTag ?: 'h3';
?>
<?php echo '<'.$headerTag.'>'.nl2br($this->escape($this->snippet->name)).'</'.$headerTag.'>'; ?>
<?php
	endif;
	
	if ($this->snippet->has_image && $this->snippet->image_id):
		$scalingTpl = property_exists($this, 'scaling_template') ? $this->scaling_template : null;
		echo $this->image()->render($this->snippet->image_id, $scalingTpl);
	endif;
	
	if ($this->snippet->has_html || $this->snippet->has_text):
		if ($this->snippet->has_text):
			$theContent = nl2br($this->escape($this->snippet->text));
			if ($this->linkify !== false):
				$theContent = $this->string()->linkify($theContent);
			endif;
		elseif ($this->snippet->has_html):
			$bodyClass = 'rich';
			if ($this->bodyClass):
				$bodyClass .= ' '.$this->bodyClass;
			endif;
			$theContent = '<div class="'.$bodyClass.'">'.$this->snippet->html.'</div>';
		endif;
		echo $theContent;
	endif;
?>

<?php
	if ($this->snippet->has_name):
		$headerTag = $this->headerTag ?: 'h3';
		$headerClass = $this->headerClass ?: '';
		echo '<'.$headerTag.($headerClass ? ' class="'.$headerClass.'"' : '').'>'.nl2br($this->escape($this->snippet->name)).'</'.$headerTag.'>';
	endif;
	
	if ($this->snippet->has_image && $this->snippet->image_id):
		$scalingTpl = property_exists($this, 'scaling_template') ? $this->scaling_template : null;
		echo $this->image()->render($this->snippet->image_id, $scalingTpl);
	endif;
	
	if ($this->snippet->has_html || $this->snippet->has_text):
		if ($this->snippet->has_text):
			$theContent = nl2br($this->escape($this->snippet->text));
			if ($this->linkify !== false):
				$theContent = $this->string()->linkify($theContent);
			endif;
		elseif ($this->snippet->has_html):
			$bodyClass = 'rich';
			if ($this->bodyClass):
				$bodyClass .= ' '.$this->bodyClass;
			endif;
			$theContent = '<div class="'.$bodyClass.'">'.$this->snippet->html.'</div>';
		endif;
		echo $theContent;
	endif;
?>

Allow class on the header
Allow class on the header
