本文整理汇总了PHP中drupal_set_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP drupal_set_breadcrumb函数的具体用法?PHP drupal_set_breadcrumb怎么用?PHP drupal_set_breadcrumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了drupal_set_breadcrumb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: songlap_preprocess_page
/**
* @file
* This file is empty by default because the base theme chain (Alpha & Omega) provides
* all the basic functionality. However, in case you wish to customize the output that Drupal
* generates through Alpha & Omega this file is a good place to do so.
*
* Alpha comes with a neat solution for keeping this file as clean as possible while the code
* for your subtheme grows. Please read the README.txt in the /preprocess and /process subfolders
* for more information on this topic.
*/
function songlap_preprocess_page(&$vars)
{
if (drupal_is_front_page()) {
$breadcrumb = array();
$breadcrumb[] = t('Home');
drupal_set_breadcrumb($breadcrumb);
}
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_null(arg(3))) {
$term = taxonomy_term_load(arg(2));
$breadcrumb = '';
$breadcrumb .= '<div class="breadcrumb">';
$breadcrumb .= '<a href="' . $vars['front_page'] . '">' . t('Home') . '</a> ';
$breadcrumb .= '» ' . $term->name;
$breadcrumb .= '</div>';
$vars['breadcrumb'] = $breadcrumb;
}
if ($_GET['q'] == 'projects') {
$breadcrumb = '';
$breadcrumb .= '<div class="breadcrumb">';
$breadcrumb .= '<a href="' . $vars['front_page'] . '">' . t('Home') . '</a> ';
$breadcrumb .= '» ' . t('Projects');
$breadcrumb .= '</div>';
$vars['breadcrumb'] = $breadcrumb;
}
}
示例2: theme
/**
* if we are using a theming system, invoke theme, else just print the
* content
*
* @param string $content the content that will be themed
* @param boolean $print are we displaying to the screen or bypassing theming?
* @param boolean $maintenance for maintenance mode
*
* @return void prints content on stdout
* @access public
*/
function theme(&$content, $print = FALSE, $maintenance = FALSE)
{
$ret = FALSE;
// TODO: Split up; this was copied verbatim from CiviCRM 4.0's multi-UF theming function
// but the parts should be copied into cleaner subclass implementations
$config = CRM_Core_Config::singleton();
if ($config->userSystem->is_drupal && function_exists('theme') && !$print) {
if ($maintenance) {
drupal_set_breadcrumb('');
drupal_maintenance_theme();
if ($region = CRM_Core_Region::instance('html-header', FALSE)) {
CRM_Utils_System::addHTMLHead($region->render(''));
}
print theme('maintenance_page', array('content' => $content));
exit;
}
$ret = TRUE;
// TODO: Figure out why D7 returns but everyone else prints
}
$out = $content;
$config =& CRM_Core_Config::singleton();
if (!$print && $config->userFramework == 'WordPress') {
if (is_admin()) {
require_once ABSPATH . 'wp-admin/admin-header.php';
} else {
// FIX ME: we need to figure out to replace civicrm content on the frontend pages
}
}
if ($ret) {
return $out;
} else {
print $out;
}
}
示例3: guifi_gml
/**
* @file guifi_gml.inc.php
*/
function guifi_gml($zid, $action = "help", $type = 'gml')
{
if ($action == "help") {
$zone = db_fetch_object(db_query('SELECT title, nick FROM {guifi_zone} WHERE id = %d', $zid));
drupal_set_breadcrumb(guifi_zone_ariadna($zid));
$output = '<div id="guifi">';
$output .= '<h2>' . t('Zone %zname%', array('%zname%' => $zone->title)) . '</h2>';
$output .= '<p>' . t('You must specify which data do you want to export, the following options are available:') . '</p>';
$output .= '<ol><li>' . l(t('Nodes'), "guifi/gml/" . $zid . "/nodes", array('title' => t('export zone nodes in gml format'))) . '</li>';
$output .= '<li>' . l(t('Links'), "guifi/gml/" . $zid . "/links", array('title' => t('export zone links in gml format'))) . '</li></ol>';
$output .= '<p>' . t('The <a href="http://opengis.net/gml/">GML</a> is a Markup Language XML for Geography described at the <a href="http://www.opengeospatial.org/">Open Geospatial Consortium</a>') . '</p>';
$output .= '<p>' . t('<b>IMPORTANT LEGAL NOTE:</b> This network information is under the <a href="http://guifi.net/ComunsSensefils/">Comuns Sensefils</a> license, and therefore, available for any other network under the same licensing. If is not your case, you should ask for permission before using it.</a>') . '</p>';
$output .= "</div>";
print theme('page', $output, t('export %zname% in GML format', array('%zname%' => $z->title)));
return;
}
switch ($action) {
case 'links':
guifi_gml_links($zid, $type);
break;
case 'nodes':
guifi_gml_nodes($zid, $type);
break;
}
}
示例4: theme
/**
* if we are using a theming system, invoke theme, else just print the
* content
*
* @param string $type name of theme object/file
* @param string $content the content that will be themed
* @param array $args the args for the themeing function if any
* @param boolean $print are we displaying to the screen or bypassing theming?
* @param boolean $ret should we echo or return output
* @param boolean $maintenance for maintenance mode
*
* @return void prints content on stdout
* @access public
*/
function theme($type, &$content, $args = NULL, $print = FALSE, $ret = FALSE, $maintenance = FALSE)
{
// TODO: Split up; this was copied verbatim from CiviCRM 4.0's multi-UF theming function
// but the parts should be copied into cleaner subclass implementations
if (function_exists('theme') && !$print) {
if ($maintenance) {
drupal_set_breadcrumb('');
drupal_maintenance_theme();
print theme('maintenance_page', array('content' => $content));
exit;
}
$out = $content;
$ret = TRUE;
} else {
$out = $content;
}
$config =& CRM_Core_Config::singleton();
if (!$print && $config->userFramework == 'WordPress') {
if (is_admin()) {
require_once ABSPATH . 'wp-admin/admin-header.php';
} else {
// FIX ME: we need to figure out to replace civicrm content on the frontend pages
}
}
if ($ret) {
return $out;
} else {
print $out;
}
}
示例5: mica_bootstrap_preprocess_html
/**
* Implements template_preprocess_html()
*/
function mica_bootstrap_preprocess_html(&$variables)
{
// hide breadcrumb on home page
if ($variables['is_front']) {
drupal_set_breadcrumb(array());
}
}
示例6: casasrealprod_process_page
/**
* Override or insert variables into the page template.
*/
function casasrealprod_process_page(&$variables)
{
// Hook into color.module.
if (module_exists('color')) {
_color_page_alter($variables);
}
// Always print the site name and slogan, but if they are toggled off, we'll
// just hide them visually.
$variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;
$variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
if ($variables['hide_site_name']) {
// If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
$variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
}
if ($variables['hide_site_slogan']) {
// If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
$variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
}
// Since the title and the shortcut link are both block level elements,
// positioning them next to each other is much simpler with a wrapper div.
if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
// Add a wrapper div using the title_prefix and title_suffix render elements.
$variables['title_prefix']['shortcut_wrapper'] = array('#markup' => '<div class="shortcut-wrapper clearfix">', '#weight' => 100);
$variables['title_suffix']['shortcut_wrapper'] = array('#markup' => '</div>', '#weight' => -99);
// Make sure the shortcut link is the first item in title_suffix.
$variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;
}
if (isset($variables['node']) && $variables['node']->type == "casas" && strpos(drupal_get_path_alias(), '/booking') > 0) {
drupal_add_js(drupal_get_path('theme', 'casasrealprod') . '/js/casas_booking_manager.js');
$breadcrumbs = array();
$breadcrumbs[] = l(t('Home'), '<front>');
$breadcrumbs[] = l(t('Las Casas'), 'node/10');
$breadcrumbs[] = l($variables['node']->title, 'node/' . $variables['node']->nid);
drupal_set_breadcrumb($breadcrumbs);
$variables['title'] = t('Search for Availability');
$variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
}
if (strpos(drupal_get_path_alias(), 'bookings') !== FALSE) {
drupal_add_js(drupal_get_path('theme', 'casasrealprod') . '/js/casas_booking_manager.js');
}
if (strpos(drupal_get_path_alias(), 'checkout') !== FALSE) {
$parts = explode('/', current_path());
$last = array_pop($parts);
$title = drupal_get_title();
if (is_numeric($last)) {
$title = t('Fill your personal data');
} else {
if ($last == 'review') {
$title = t('Review order');
}
}
$variables['title'] = $title;
}
}
示例7: maxhealthcare_breadcrumb
/**
* Override theme_breadcrumb().
*/
function maxhealthcare_breadcrumb($breadcrumb)
{
$links = array();
$path = '';
// Get URL arguments
$arguments = explode('/', request_uri());
// Remove empty values
foreach ($arguments as $key => $value) {
if (empty($value)) {
unset($arguments[$key]);
}
}
$arguments = array_values($arguments);
// Add 'Home' link
$links[] = l(t('Home'), '<front>');
// Add other links
if (!empty($arguments)) {
foreach ($arguments as $key => $value) {
// Don't make last breadcrumb a link
if ($key == count($arguments) - 1) {
$links[] = drupal_get_title();
} else {
if (!empty($path)) {
$path .= '/' . $value;
} else {
$path .= $value;
}
$links[] = l(drupal_ucfirst($value), $path);
}
}
}
// Set custom breadcrumbs
drupal_set_breadcrumb($links);
// Get custom breadcrumbs
$breadcrumb = drupal_get_breadcrumb();
// Hide breadcrumbs if only 'Home' exists
if (count($breadcrumb) > 1) {
return '<div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>';
}
}
示例8: ciclo20v2_breadcrumb
/**
* Breadcrumb themeing
*/
function ciclo20v2_breadcrumb($breadcrumb)
{
if (!empty($breadcrumb)) {
$html = '';
if (preg_match('/^og\\/users\\/\\d+\\/invite$/', $_GET[q]) == 1) {
$node = node_load(arg(2));
if (!empty($node)) {
$links = array();
$links[] = l(t('Home'), '<front>');
$links[] = l(t('Groups'), 'og');
$links[] = l($node->title, 'node/' . $node->nid);
$links[] = l(t('List'), 'og/users/' . $node->nid);
// Set custom breadcrumbs
drupal_set_breadcrumb($links);
// Get custom breadcrumbs
$breadcrumb = drupal_get_breadcrumb();
}
}
if (count($breadcrumb) > 1) {
$html .= '<div class="breadcrumb">' . implode(' > ', $breadcrumb) . '</div>';
}
return $html;
}
}
示例9: get_form
//.........这里部分代码省略.........
foreach ($settings['branchCmsUserAttr']['default'] as $value) {
// now multi value
if ($value['default'] == $user->uid) {
// comparing string against int so no triple equals
$settings['canEditBody'] = true;
$settings['canAllocUser'] = true;
break;
}
}
}
}
// for an admin user the defaults apply, which will be can do everything.
// find the number of sections attribute.
foreach ($settings['attributes'] as $attr) {
if ($attr['caption'] === 'No. of sections') {
$settings['numSectionsAttr'] = $attr['fieldname'];
for ($i = 1; $i <= $attr['displayValue']; $i++) {
$settings['sections']["S{$i}"] = null;
}
$existingSectionCount = empty($attr['displayValue']) ? 1 : $attr['displayValue'];
data_entry_helper::$javascript .= "\$('#" . str_replace(':', '\\\\:', $attr['id']) . "').attr('min',{$existingSectionCount}).attr('max'," . $args['maxSectionCount'] . ");\n";
if (!$settings['canEditSections']) {
data_entry_helper::$javascript .= "\$('#" . str_replace(':', '\\\\:', $attr['id']) . "').attr('readonly','readonly').css('color','graytext');\n";
}
}
}
$sections = data_entry_helper::get_population_data(array('table' => 'location', 'extraParams' => $auth['read'] + array('view' => 'detail', 'parent_id' => $settings['locationId'], 'deleted' => 'f', 'orderby' => 'id'), 'nocache' => true));
foreach ($sections as $section) {
$code = $section['code'];
data_entry_helper::$javascript .= "indiciaData.sections.{$code} = {'geom':'" . $section['boundary_geom'] . "','id':'" . $section['id'] . "','sref':'" . $section['centroid_sref'] . "','system':'" . $section['centroid_sref_system'] . "'};\n";
$settings['sections'][$code] = $section;
}
} else {
// not an existing site therefore no walks. On initial save, no section data is created.
foreach ($settings['attributes'] as $attr) {
if ($attr['caption'] === 'No. of sections') {
$settings['numSectionsAttr'] = $attr['fieldname'];
data_entry_helper::$javascript .= "\$('#" . str_replace(':', '\\\\:', $attr['id']) . "').attr('min',1).attr('max'," . $args['maxSectionCount'] . ");\n";
}
}
$settings['walks'] = array();
}
if ($settings['numSectionsAttr'] === '') {
for ($i = 1; $i <= $settings['maxSectionCount']; $i++) {
$settings['sections']["S{$i}"] = null;
}
}
$r = '<div id="controls">';
$headerOptions = array('tabs' => array('#site-details' => lang::get('Site Details')));
if ($settings['locationId']) {
$headerOptions['tabs']['#your-route'] = lang::get('Your Route');
if ($args['always_show_section_details'] || count($settings['section_attributes']) > 0) {
$headerOptions['tabs']['#section-details'] = lang::get('Section Details');
}
}
if (count($headerOptions['tabs'])) {
$r .= data_entry_helper::tab_header($headerOptions);
data_entry_helper::enable_tabs(array('divId' => 'controls', 'style' => 'Tabs', 'progressBar' => isset($args['tabProgress']) && $args['tabProgress'] == true));
}
$r .= self::get_site_tab($auth, $args, $settings);
if ($settings['locationId']) {
$r .= self::get_your_route_tab($auth, $args, $settings);
if ($args['always_show_section_details'] || count($settings['section_attributes']) > 0) {
$r .= self::get_section_details_tab($auth, $args, $settings);
}
}
$r .= '</div>';
// controls
data_entry_helper::enable_validation('input-form');
if (function_exists('drupal_set_breadcrumb')) {
$breadcrumb = array();
$breadcrumb[] = l(lang::get('Home'), '<front>');
$breadcrumb[] = l(lang::get('Sites'), $args['sites_list_path']);
if ($settings['locationId']) {
$breadcrumb[] = data_entry_helper::$entity_to_load['location:name'];
} else {
$breadcrumb[] = lang::get('New Site');
}
drupal_set_breadcrumb($breadcrumb);
}
// Inform JS where to post data to for AJAX form saving
data_entry_helper::$javascript .= 'indiciaData.ajaxFormPostUrl="' . self::$ajaxFormUrl . "\";\n";
data_entry_helper::$javascript .= 'indiciaData.ajaxFormPostSampleUrl="' . self::$ajaxFormSampleUrl . "\";\n";
data_entry_helper::$javascript .= 'indiciaData.website_id="' . $args['website_id'] . "\";\n";
data_entry_helper::$javascript .= "indiciaData.indiciaSvc = '" . data_entry_helper::$base_url . "';\n";
data_entry_helper::$javascript .= "indiciaData.readAuth = {nonce: '" . $auth['read']['nonce'] . "', auth_token: '" . $auth['read']['auth_token'] . "'};\n";
data_entry_helper::$javascript .= "indiciaData.currentSection = '';\n";
data_entry_helper::$javascript .= "indiciaData.sectionTypeId = '" . $settings['locationTypes'][1]['id'] . "';\n";
data_entry_helper::$javascript .= "indiciaData.sectionDeleteConfirm = \"" . lang::get('Are you sure you wish to delete section') . "\";\n";
data_entry_helper::$javascript .= "indiciaData.sectionInsertConfirm = \"" . lang::get('Are you sure you wish to insert a new section after section') . "\";\n";
data_entry_helper::$javascript .= "indiciaData.sectionChangeConfirm = \"" . lang::get('Do you wish to save the currently unsaved changes you have made to the Section Details?') . "\";\n";
data_entry_helper::$javascript .= "indiciaData.numSectionsAttrName = \"" . $settings['numSectionsAttr'] . "\";\n";
data_entry_helper::$javascript .= "indiciaData.maxSectionCount = \"" . $settings['maxSectionCount'] . "\";\n";
data_entry_helper::$javascript .= "indiciaData.autocalcSectionLengthAttrId = " . $settings['autocalcSectionLengthAttrId'] . ";\n";
data_entry_helper::$javascript .= "indiciaData.defaultSectionGridRef = '" . $settings['defaultSectionGridRef'] . "';\n";
if ($settings['locationId']) {
data_entry_helper::$javascript .= "selectSection('S1', true);\n";
}
return $r;
}
示例10: alim_preprocess_search_results
/**
* Process variables for search-results.tpl.php.
*
* The $variables array contains the following arguments:
* - $results
* - $type
*
* @see search-results.tpl.php
* default preprocess search function is altered for adding drupal collapsible fieldset to advanced search
*/
function alim_preprocess_search_results(&$variables) {
$keys = search_get_keys();
$tot_res_cnt = 0;
if($variables['type'] == 'alimsearch' ){ // only for advanced search groups the search results in to fieldsets
$variables['search_results'] = '';
$crumb = drupal_get_breadcrumb();
$c = count($crumb);
unset($crumb[$c-1]);
drupal_set_breadcrumb($crumb);
drupal_set_title('Search Results');
foreach($variables['results'] as $key => $val ){
$value = "";$ct ='';
$value .= $val['pagerval'];
if($val['empty'])
$value .= $val['empty'];
foreach ($val['results'] as $result) {
$value .= theme('search_result', $result, $variables['type']);
}
$tot_res_cnt += $val['tot_res_cnt'];
$ct .= '<div><a href="#search-'.$key.'" >'.$val['search_ind'].' </a></div>';
$variables['search_results'] .= theme('fieldset', // collpasible group of results in advanced search
array(
'#title' => $val['fullname'],
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#value' => $value,
'#attributes' => array('id' => 'search-'.$key)
)
);
$variables['counter_left'] .= $ct ;
}
// Provide alternate search results template.
$variables['template_files'][] = 'search-results-'. $variables['type']; // adding template sugessions
}else{ // for simple search
$variables['search_results'] = '';
$crumb = drupal_get_breadcrumb();
$c = count($crumb);
unset($crumb[$c-1]);
drupal_set_breadcrumb($crumb);
drupal_set_title('Search Results');
// $variables['search_results'] = '';
foreach ($variables['results'] as $result) {
$variables['search_results'] .= theme('search_result', $result, $variables['type']);
}
if(arg(0) == 'alimsearch' ){
$variables['pager'] = theme('pager', NULL, 10, 0);
}
else{
$variables['pager'] = theme('pager', NULL, 100, 0);
}
// Provide alternate search results template.
$variables['template_files'][] = 'search-results-'. $variables['type']; // adding template sugessions
global $pager_total_items;
$tot_res_cnt = $pager_total_items[0];
}
$script = "var search_key_value = '".$keys." => result count - ".substr($tot_res_cnt,0,30)."'";
drupal_add_js($script, 'inline', 'footer');
}
示例11: theme
<?php //print theme('breadcrumb', drupal_get_breadcrumb( )); ?>
<?php if(arg(0) == 'events'){
$crumbs = drupal_get_breadcrumb();
if(empty($crumbs[4])){
unset($crumbs[3]);
}
drupal_set_breadcrumb($crumbs);
print theme('breadcrumb', drupal_get_breadcrumb( ));
}
?>
<div class="vertical_tab_container">
<div class="vertical_tab_elements">
<?php print theme('wistar_vertical_tabs');?>
<div class="content">
<?php print theme('wistar_content_heading', $node);?>
<div class="node technology node-technology">
<div class="section">
<?php if($rows): ?>
<!-- store expandable list -->
<div class="expandable_list_container">
<div class="expandable_list_elements">
<ul class="expandable_list">
<?php foreach( $view->result as $idx => $result ): ?>
<li>
<a class="anchor" href="#">
<?php print $result->node_title; ?>
<?php if($date = $view->render_field('field_event_date_value', $idx)): ?>
<?php print ' - ' . $date; ?>
<?php endif; ?>
<span class="icon"> </span>
</a>
示例12: theme
/**
* if we are using a theming system, invoke theme, else just print the
* content
*
* @param string $type name of theme object/file
* @param string $content the content that will be themed
* @param array $args the args for the themeing function if any
* @param boolean $print are we displaying to the screen or bypassing theming?
* @param boolean $ret should we echo or return output
* @param boolean $maintenance for maintenance mode
*
* @return void prints content on stdout
* @access public
*/
function theme($type, &$content, $args = null, $print = false, $ret = false, $maintenance = false)
{
if (function_exists('theme') && !$print) {
if ($maintenance) {
drupal_set_breadcrumb('');
drupal_maintenance_theme();
}
$out = theme($type, $content, $args);
} else {
$out = $content;
}
if ($ret) {
return $out;
} else {
print $out;
}
}
示例13: wizardAutoDetect
function wizardAutoDetect($searchTitle = '')
{
// We expect the URL to contain the Swimlane-Page title - Strip the query string from the URL if it exists
$ruri = request_uri();
if (strpos($ruri, '?') !== false) {
$ruri = substr($ruri, 0, strpos($ruri, '?'));
}
// We expect the URL to contain the Swimlane-Page (node) title for the target swimlane/wizard
$ruri = explode('/', $ruri);
$swimlaneTitle = $ruri[count($ruri) - 1];
$swimlaneTitle = urldecode($swimlaneTitle);
// We may have been given the title to search for
if ($searchTitle !== '') {
$swimlaneTitle = $searchTitle;
}
// SQL to find the Swimlane-Page node based on the title
$q = "\n SELECT nid AS nid\n FROM node n\n WHERE\n n.type = 'swim_lane_page'\n AND InStr(n.title, '{$swimlaneTitle}')<>0\n LIMIT 1\n ";
// Debug
if (strpos(request_uri(), '-DEBUG-WIZARDDETECT-QUERY-') !== false) {
dsm($q);
}
// Search for this node
$result = db_query($q);
$swimlaneNid = false;
foreach ($result as $record) {
$swimlaneNid = $record->nid;
}
if ($swimlaneNid === false) {
return "Error - Could not find the target swimlane title ({$swimlaneTitle})";
}
// Get the File-Id of the Wizard-Excel-Source field in the target Swimlane-Page node
$n = node_load($swimlaneNid);
$fid = false;
if (!empty($n->field_swimlane_wizexcelfile) && is_array($n->field_swimlane_wizexcelfile) && !empty($n->field_swimlane_wizexcelfile['und'])) {
$fid = $n->field_swimlane_wizexcelfile['und'][0]['fid'];
}
if ($fid === false) {
return 'Error - This this swimlane does not have an associated wizard';
}
// Get the real path of this file
$dFile = file_load($fid);
if ($dFile === false) {
print 'Error - Wizard (source-file) not found';
return;
}
$wizSrcPath = drupal_realpath($dFile->uri);
// Verify this path truly exists
if (!file_exists($wizSrcPath)) {
print 'Error - The Wizard-Excel-Source sheet is missing! - ' . $wizSrcPath . '<br/>';
print '<span class="admin-only">Please <a href="/node/' . $swimlaneNid . '/edit">edit the swimlane</a>, and upload the appropriate excel spreadsheet</span>';
if (function_exists('debugEmail')) {
$serverDomain = 'https://' . $_SERVER['SERVER_NAME'];
debugEmail('critical', 'An Excel-Source spreadsheet is missing for the "' . $n->title . '" Wizard! <br/>' . 'The expected path of this file was: ' . $wizSrcPath . '<br/>' . "This swimlane/wizard can be editted from <a href=\"{$serverDomain}/node/{$swimlaneNid}/edit\">{$serverDomain}/node/{$swimlaneNid}/edit</a><br/> " . '
<form action="/dev/ulswimlanefile" method="post">
<input type="hidden" name="nid" id="nid" value="' . $swimlaneNid . '" /><br/>
<b>Please upload the excel file for this swimlane now:</b><br/>
<input type="file" name="excelFile" id="excelFile" /><br/>
<input type="submit" />
</form>
');
}
return;
}
// Load BUSA Wizard dependencies
include 'sites/all/themes/bususa/templates/wizard/BusinessUSAWizard.classes.php';
// Create and print the wizard
$wiz = new BusinessUSAWizard();
$wiz->swimlaneNid = $swimlaneNid;
$wiz->loadFromExcel($wizSrcPath);
$html = $wiz->render();
// Debug
if (strpos(request_uri(), '-DEBUG-VERBOSE-WIZARD-') !== false) {
dsm(array('wiz' => $wiz, 'wiz->getAllTagsUsedInWizard' => $wiz->getAllTagsUsedInWizard()));
}
// Build Breadcrumbs
$breadcrumb = array();
$breadcrumb[] = l('Home', '<front>');
$breadcrumb[] = $wiz->title;
drupal_set_breadcrumb($breadcrumb);
// Fix a styling bug where the width of the content area is not taking all space (can this be done through contexts while applying single-column layout?)
$html .= '
<style>
/* The following style(s) are stored inside sites\\all\\themes\\bususa\\templates\\wizard\\wizard.php */
#region-content {
width: 100%;
}
</style>
';
// If this wizard should be loaded in Widget mode, then we only want everything in $html to be the ONLY markup printed within the body tag...
// for this we use the global $overrideBodyMarkup variable - refer to html.tpl.php to see the use of this override
if (!empty($_GET['widget']) && (intval($_GET['widget']) === 1 || trim(strtolower($_GET['widget'])) === 'true')) {
global $overrideBodyMarkup;
$overrideBodyMarkup = $html;
}
return $html;
}
示例14: ardent_custom_breadcrumb
/**
* Generate a custom breadcrumb trail
*/
function ardent_custom_breadcrumb($vars)
{
$breadcrumb = array();
// Set home as the first item
$breadcrumb[] = l(t('Home'), '<front>');
// Add node types into breadcrumb trail
switch ($vars['node']->type) {
case 'publications':
$breadcrumb[] = l(t('Articles'), 'publications');
break;
}
drupal_set_breadcrumb($breadcrumb);
return $breadcrumb;
}
示例15: while
$spaceString = ' ';
while ($length > 0) {
$spaceString .= ' ';
$length -= 1;
}
$table_rows[$row['display_order']]['category'] = $row['category'];
$table_rows[$row['display_order']]['highlight_yn'] = $row['highlight_yn'];
$table_rows[$row['display_order']]['indentation_level'] = $row['indentation_level'];
$table_rows[$row['display_order']]['amount_display_type'] = $row['amount_display_type'];
$table_rows[$row['display_order']][$row['fiscal_year']]['amount'] = $row['amount'];
$years[$row['fiscal_year']] = $row['fiscal_year'];
}
rsort($years);
if (preg_match('/featuredtrends/', $_GET['q'])) {
$links = array(l(t('Home'), ''), l(t('Trends'), 'featured-trends'), '<a href="/featured-trends?slide=2">Capital Projects Fund Aid Revenues</a>', 'Capital Projects Fund Aid Revenues Details');
drupal_set_breadcrumb($links);
}
?>
<?php
if ($node->widgetConfig->table_title) {
echo '<h3>' . $node->widgetConfig->table_title . '</h3>';
}
?>
<a class="trends-export" href="/export/download/trends_capital_proj_rev_by_agency_csv?dataUrl=/node/<?php
echo $node->nid;
?>
">Export</a>
<table class="fy-ait">
<tbody>