<div class="module subWidgetNameModule">
<h3>Sub widget Title</h3>
<div class="moduleContent">
...sub widget content...
</div>
</div>
Page 1 of 1
Sub widgets and Master widget
#1
Posted 06 February 2010 - 11:54 PM
I have a series of widgets (sub widgets) that share common HTML btw them, I was wondering how I could create a "master" widget to output the common HTML.
#2
Posted 07 February 2010 - 03:01 AM
It seems that you need to create a parent widget, and rewrite it's run() method to output something like:
All child widgets should provide getTitle() and getContent() methods, so you can declare them as "abstract" in your parent (master) widget.
<div class="module <?=$this->id?>Module">
<h3><?=$this->getTitle()?></h3>
<div class="moduleContent">
<?=$this->getContent()?>
</div>
</div>
All child widgets should provide getTitle() and getContent() methods, so you can declare them as "abstract" in your parent (master) widget.
Share this topic:
Page 1 of 1

Help












