qwerty
(qwerty)
1
Hi,
I used widget like this
<?php $this->beginWidget('path.to.WidgetClass'); ?>
...body content that may be captured by the widget...
<?php $this->endWidget(); ?>
Which method can capture body content? I use init() and run() to show begin and end widget.
Thanx.
qiang
(Qiang Xue)
2
You can use ob buffer to capture the body content.
Alternatively, you can extend COutputProcessor. You may refer to CMarkdown on how to extend COutputProcessor.
qwerty
(qwerty)
3
And to conditionally display content in widget I have to use these methods?