etabbeddiv A simple way to generate a div with tabbed contents

  1. Requirements
  2. Usage

This short extension allow you to easily add a div containing tabs.

Requirements

  • Yii 1.1 or above
  • jquery ui

Usage

Just initialise the widget with the required params:

<?php $this->widget('application.extensions.ETabbedDiv',
   array(
      'divClass' => 'tabbed',
      'tabs' => array(
         'tab1' => array('content' => '<p>this is the first tab</p>'),
         'tab2' => array('title'=>'Second', 'content' => '<p>this is the second tab</p>'),
         'other' => array('content' => '<p>this is the third and last tab</p>'),
      ),
   ),
);
?>

Whith:

  • divClass (optional) : the css class for the main div,
  • tabs : an associated array, the key is the id of the tab (must be unique) and the value is another array:
  • title (optional) : the title displayed in the tab. If not set, the id is used,
  • content : the html content of the tab
0 0
1 follower
194 downloads
Yii Version: Unknown
License: GPL-3.0
Category: User Interface
Developed by: CrazyCat
Created on: Mar 17, 2014
Last updated: 10 years ago

Downloads

show all

Related Extensions