function yield_content($key = 'default', $echo = true) { global $content; $out = has_content($key) ? $content[$key] : ''; if ($echo) { echo $out; } else { return $out; } }
// close div id="splashboard" echo '<div role="tabpanel" class="tab-pane active" id="profile-display">'; init_ajax_block(elgg_echo('gcconnex_profile:about_me'), 'about-me', $user); echo elgg_view('b_extended_profile/about-me'); finit_ajax_block('about-me'); if (has_content($user, 'education')) { init_ajax_block(elgg_echo('gcconnex_profile:education'), 'education', $user); echo elgg_view('b_extended_profile/education'); finit_ajax_block('education'); } if (has_content($user, 'work')) { init_ajax_block(elgg_echo('gcconnex_profile:experience'), 'work-experience', $user); echo elgg_view('b_extended_profile/work-experience'); finit_ajax_block('work-experience'); } if (has_content($user, 'gc_skills')) { init_ajax_block(elgg_echo('gcconnex_profile:gc_skills'), 'skills', $user); echo elgg_view('b_extended_profile/skills'); finit_ajax_block('skills'); } init_ajax_block(elgg_echo('gcconnex_profile:langs'), 'languages', $user); echo elgg_view('b_extended_profile/languages'); finit_ajax_block('languages'); // create the div wrappers and edit/save/cancel toggles for each profile section echo '</div>'; //close div id=#profile-display echo '<div role="tabpanel" class="tab-pane" id="portfolio">'; init_ajax_block(elgg_echo('gcconnex_profile:portfolio'), 'portfolio', $user); echo elgg_view('b_extended_profile/portfolio'); // call the proper view for the section finit_ajax_block('portfolio');
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <title><?php echo has_content('title') ? yield_content('title', false) . ' - ' : ''; ?> [SITE NAME]</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--[if ! lte IE 6]><!--> <link rel="stylesheet" href="css/application.css"> <?php yield_content('stylesheets'); ?> <!--<![endif]--> <!--[if lte IE 6]> <link rel="stylesheet" href="css/libs/ie6.1.1.css"> <style>html { padding-top: 42px; }</style> <![endif]--> <script src="js/libs/modernizr-2.7.0.min.js"></script> </head> <body> <?php yield_content(); ?> <!--[if ! lte IE 6]><!--> <script src="js/libs/jquery-1.10.2.min.js"></script>