Changeset 3947
- Timestamp:
- 05/07/07 16:09:51 (6 years ago)
- Files:
-
- plugins/sfThreeColumnLayoutHelperPlugin/lib/helper/ThreeColumnLayoutHelper.php (modified) (6 diffs)
- plugins/sfThreeColumnLayoutHelperPlugin/web (added)
- plugins/sfThreeColumnLayoutHelperPlugin/web/css (added)
- plugins/sfThreeColumnLayoutHelperPlugin/web/css/disable_left_column.css (added)
- plugins/sfThreeColumnLayoutHelperPlugin/web/css/disable_right_column.css (added)
- plugins/sfThreeColumnLayoutHelperPlugin/web/css/three_column_layout_helper.css (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfThreeColumnLayoutHelperPlugin/lib/helper/ThreeColumnLayoutHelper.php
r3912 r3947 1 1 <?php 2 sfContext::getInstance()->getResponse()->addStylesheet('/sfThreeColumnLayoutHelperPlugin/css/three_column_layout_helper'); 3 2 4 /** 3 5 * Get Default Slot … … 38 40 { 39 41 // This is a symfony core function 40 $slot = get_slot($slotName); 41 42 if( $slot != 'disabled' ) 43 { 44 if( !$slot ) 45 { 46 $slot = get_default_slot($column, $num); 47 } 48 } 42 $slot = get_slot($slotName); 49 43 } else { 50 44 $slot = get_default_slot($column, $num); … … 84 78 function get_layout_column($column, $numSlots = 5) 85 79 { 86 $slots = '';80 $slots = ''; 87 81 for($i = 1; $i <= $numSlots; $i++) 88 82 { … … 92 86 // If we have slots for the column then lets wrap it and return it 93 87 if( $slots ) 94 { 95 $html = '<div id="'.$column.'_column">';88 { 89 $html = '<div id="'.$column.'_column">'; 96 90 $html .= $slots; 97 91 $html .= '</div>'; … … 116 110 { 117 111 disable_layout_column_slots($column); 118 sfContext::getInstance()->getResponse()->addStylesheet(' disable_'.$column.'_column');112 sfContext::getInstance()->getResponse()->addStylesheet('/sfThreeColumnLayoutHelperPlugin/css/disable_'.$column.'_column'); 119 113 } 120 114 … … 222 216 return $column.'_column_slot_'.$num; 223 217 } 218 219 /** 220 * get_layout_content_wrapper 221 * 222 * @param mixed $sf_data 223 * @access public 224 * @return void 225 */ 226 function get_layout_content_wrapper($sf_data) 227 { 228 $html = get_layout_slot('outer_top', 1); 229 230 $html .= '<div id="content_wrapper"> 231 <div id="content">'; 232 233 $html .= get_layout_slot('inner_top', 1); 234 235 $html .= $sf_data->getRaw('sf_content'); 236 237 $html .= get_layout_slot('inner_bottom', 1); 238 239 $html .= '<br/></div></div>'; 240 241 $html .= get_layout_slot('outer_bottom', 1); 242 243 return $html; 244 } 245 246 /** 247 * get_three_column_layout 248 * 249 * @param mixed $sf_data 250 * @access public 251 * @return void 252 */ 253 function get_three_column_layout($sf_data) 254 { 255 $html = get_layout_column('left'); 256 $html .= get_layout_column('right'); 257 258 $html .= get_layout_content_wrapper($sf_data); 259 260 return $html; 261 }