Changeset 3315 for plugins/multiToc/trunk/_widgets.php
- Timestamp:
- 01/05/15 16:41:03 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/multiToc/trunk/_widgets.php
r3039 r3315 21 21 $w->create('multiToc',__('Table of content'),array('multiTocWidgets','widget')); 22 22 $w->multiToc->setting('title',__('Title:'),__('Table of content')); 23 $w->multiToc->setting('homeonly',__('Home page only'),true,'check'); 23 $w->multiToc->setting('homeonly',__('Display on:'),0,'combo', 24 array( 25 __('All pages') => 0, 26 __('Home page only') => 1, 27 __('Except on home page') => 2 28 ) 29 ); 30 $w->multiToc->setting('content_only',__('Content only'),0,'check'); 31 $w->multiToc->setting('class',__('CSS class:'),''); 32 $w->multiToc->setting('offline',__('Offline'),0,'check'); 24 33 } 25 34 … … 28 37 global $core; 29 38 30 if ($w->homeonly && $core->url->type != 'default') { 39 if ($w->offline) 40 return; 41 42 if (($w->homeonly == 1 && $core->url->type != 'default') || 43 ($w->homeonly == 2 && $core->url->type == 'default')) { 31 44 return; 32 45 } … … 34 47 $amask = '<a href="%1$s">%2$s</a>'; 35 48 $limask = '<li class="%1$s">%2$s</li>'; 36 37 $title = (strlen($w->title) > 0) ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '';38 49 39 50 $res = ''; … … 55 66 56 67 if (!empty($res)) { 57 $res = 58 '<div id="info-blog">'. 59 $title. 60 '<ul>'.$res.'</ul>'. 61 '</div>'; 68 $res = 69 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 70 '<ul>'.$res.'</ul>'; 71 72 return $w->renderDiv($w->content_only,'info-blog '.$w->class,'',$res); 73 62 74 } 63 75 64 return $res;65 76 } 66 77 } 67 68 ?>
Note: See TracChangeset
for help on using the changeset viewer.