[TYPO3-project-formidable] Wrap for modalboxes does not work

JéŽrô™me Schneider typo3dev at ameos.com
Mon Aug 24 17:51:12 CEST 2009


Hi Bernd,

Due to limitations in it's design, the modalbox cannot be wrapped.
It is possible to template and CSS it, though.

To apply custom styles on the modalbox:
---------------------------------------
When calling the majixShowBox method, you may pass css styles as an 
argument. Like that:

return $this->oForm->aORenderlets["mbox"]->majixShowBox(array(
     "style" => array(
         "background" => "white",
         "border" => "5px solid black",
         "padding" => "30px",
         "text-align" => "left"
     )
));


To apply custom HTML template:
------------------------------
If your application uses a renderer:TEMPLATE, all you have to do to 
apply a template on the modalbox is to create a subpart in your template 
that has the same name as your modalbox. Example, with a button named 
btn_openmbox and a modalbox named mbox:
	

<!-- ###MAIN### begin-->

	<p>Hello world</p>
	<p>{btn_openmbox}</p>

	<!-- ###mbox### begin-->
		<div style="text-align: left;">
			<h2>This is the modalbox</h2>
			<p>{txt1.label.tag} {txt1.input}</p>
			<p>{btncancel} {btnok}</p>
		</div>
	<!-- ###mbox### end-->
	
<!-- ###MAIN### end-->

If your application does not use a renderer:TEMPLATE, you have to add a 
template-tag inside the childs configuration of your modalbox; example:

<renderlet:MODALBOX name="mbox">
     <childs>
         <template
             path="EXT:myext/pi1/template.html"
             subpart="###mbox###"
         />
     </childs>
</renderlet:MODALBOX>


I hope it helped,
Jerome


Bernd Schönbach a écrit :
> Hi,
> 
> We are trying to use modalboxes I tried to wrap the modalboxes with the
> wrap parameter in our own div class, but formidable seems to ignore the
> wrap parameter.
> 
> My setup looks like this:
> 
> newModalBox = renderlet:MODALBOX
> newModalBox {
> 	name = new Modal Box
> 	wrap = <div class="newModalbox">|</div>
> 	childs {
> 		modalboxChild = renderlet:TEXT
> 		modalboxChild {
> 			name = modalbox-title
> 			label = this is the title
> 			wrap = <div class="childWrap">|</div>
> 		}
> }
> 
> The wrapping of the child is working, but the wrapping of the modalbox
> is ignored.
> 
> I am using formidable 1.1. rev. 386
> 
> Greetings
> Bernd


More information about the TYPO3-project-formidable mailing list