How to print opening and closing PHP tags (<?php ?>) in a view, in a part, that is formatted by CMarkdown widget?
If I try something like this:
<?php $this->beginWidget('CMarkdown'); ?>
~~~
[php]
<?php $this->widget('bootstrap.widgets.TbButton', array
(
'label'=>'Primary',
'type'=>'primary', // null, 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
'size'=>'large', // null, 'large', 'small' or 'mini'
)); ?>
~~~
<?php $this->endWidget(); ?>
Code inside is being executed, making huge mess in a view.
If I use entites instead:
<?php $this->beginWidget('CMarkdown'); ?>
~~~
[php]
<?php $this->widget('bootstrap.widgets.TbButton', array
(
'label'=>'Primary',
'type'=>'primary', // null, 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
'size'=>'large', // null, 'large', 'small' or 'mini'
)); ?>
~~~
<?php $this->endWidget(); ?>
they’re printed in unchanged way (due to using them in code block).