Smutty
MVC Framework
View Code: function.tabpage
Browse: All · Classes · Plugins
1
<?php
2
4
5
$style = 'display:none;';
6
$class = v( $params, 'class' );
7
$id = v( $params, 'id' );
8
$html = '';
9
10
if ( !$id )
11
Smutty_Error::fatal( 'you need to specify an "id" for tab pages', 'SmuttyViews' );
12
13
if ( !$class )
14
$style .= 'background-color:#ddd;' .
15
'border:1px #777 solid;' .
16
'padding:10px;';
17
18
$html .= Smutty_Smarty::htmlElement( 'div', array(
19
'class' => $class,
20
'style' => $style,
21
'id' => $id
22
), $smarty );
23
24
if ( v($params,'default') == 'yes' )
25
$html .= '<script type="text/javascript">' .
26
'smutty_tabPageShow(\'' . $id . '\');' .
27
'</script>';
28
29
return $html;
30
31
}
32
34
echo smutty_function_tabpage( $params, $smarty );
35
}
36
37
?>
The code shown here is the code that is currently running this site. If you want to view the latest SVN version of the code then go to the Subversion repository.