Maslosoft Framework Logo Maslosoft Framework Documentation
Flexible Application Foundation


Tabs in Modal

Tabs widget can be placed inside modal window. Simply pass entire widget as a modal $content param:

echo $modal = Modal::widget([
	'title' => 'Tabs in Modal Window',
	'autoOpen' => true,
	'content' => Tabs::widget([
		'items' => [
			[
				'label' => 'Item one',
				'content' => 'This tabs are contained within window'
			],
			[
				'label' => 'Item two',
				'content' => 'Content of two'
			],
		]
	])
]);

Open window
Variable $modal is also captured to create above link for opening modal window:

<a href="#" data-bind="click: <?= $modal->jsRef->open; ?>">Open window</a>