addOption( 'Block Controls', $module, $action ); // insert a break between theme elements $theme->breakContent(); // create a new panel $panel = new MPanel( 'pnlDummy', 'Block Controls' ); // new span $span = new MSpan( '', 'MSpan Content' ); $span->addStyle( 'color', 'blue' ); // div with $div = new MDiv( '', 'A MDiv with a few text' ); $div->addStyle( 'float', 'right' ); $div->addStyle( 'background-color', '#ACC' ); // new div wich'll be used as internal content in div3 $div2 = new MDiv( '', 'Internal' ); $div2->addStyle( 'background-color','#999900' ); $div2->addStyle( 'width','100px' ); $div2->addStyle( 'color','#FFF' ); // new div with $div2 as content $div3 = new MDiv( '', $div2 ); $div3->addStyle( 'background-color','#DDD' ); $div3->addStyle( 'width','300px' ); $div3->addStyle( 'padding','5px' ); $div3->addStyle( 'float','left' ); $fields = new MCheckBox( 'chkBox', 'value', 'CheckBox', true, 'Text' ); $div4 = new MDiv( '', $fields ); $controls = array( new MText('', 'A MSpan with style: '), $span, new MSeparator(), new MText('', 'A MDiv with float:right and bgcolor: '), $div, new MSeparator(), new MText('', 'A nested MDiv: '), $div3, $div4 ); $panel->addControl( $controls, '', 'clear' ); // insert the $panel to the theme $theme->insertContent( $panel ); // create a link to view the source of the file $src = new ViewSource( __FILE__ ); $theme->appendContent( $src ); ?>