<?php

if ($node) {
    $tags = field_attach_view('node', $node, 'full');
}
$taxon = get_title_data();
global $user;
global $base_url;
global $base_path;
$dataportal_base_url = theme_get_setting('vizz2_dataportal_base_url', 'vizz2');
$results = array();
$view = views_get_view_result('viewallevents', 'page_1');
foreach ($view as $key => $vnode) {
    $nid = $vnode->nid;
    $anode = node_load($nid);
    $results[$key] = $anode;
    // $results[$nid]['fields'] = field_attach_view('node', $anode,'full' ) ;
    // print render ( $result[$nid]->field_featured  ) ;
}
// dpm($page) ;
//newsroom/events
?>
<body class="search">
<header>
  <div id="top">
    <div class="content">
      <div class="account">
		<?php 
if (!$logged_in) {
    ?>
        <a href="<?php 
 public function view($entity, $view_mode = 'full', $langcode = NULL)
 {
     // Allow modules to change the view mode.
     $context = array('entity_type' => 'fieldable_panels_pane', 'entity' => $entity, 'langcode' => $langcode);
     drupal_alter('entity_view_mode', $view_mode, $context);
     // attach our fields and prepare the pane for rendering
     field_attach_prepare_view('fieldable_panels_pane', array($entity->fpid => $entity), $view_mode, $langcode);
     entity_prepare_view('fieldable_panels_pane', array($entity->fpid => $entity), $langcode);
     $build = field_attach_view('fieldable_panels_pane', $entity, $view_mode, $langcode);
     $build += array('#fieldable_panels_pane' => $entity, '#theme' => 'fieldable_panels_pane', '#element' => $entity, '#view_mode' => $view_mode, '#language' => $langcode);
     // Add contextual links for this fieldable panel pane, except when the pane
     // is already being displayed on its own page. Modules may alter this
     // behavior (for example, to restrict contextual links to certain view
     // modes) by implementing hook_fieldable_panels_pane_view_alter().
     if (!empty($entity->fpid) && !($view_mode == 'full' && fieldable_panels_pane_is_page($entity))) {
         $build['#contextual_links']['fieldable_panels_panes'] = array('admin/structure/fieldable-panels-panes/view', array($entity->fpid));
     }
     $entity_type = 'fieldable_panels_pane';
     drupal_alter(array('fieldable_panels_pane_view', 'entity_view'), $build, $entity_type);
     return $build;
 }
Ejemplo n.º 3
0
  /**
   * Renders a test_entity and sets the output in the internal browser.
   *
   * @param int $id
   *   The test_entity ID to render.
   * @param string $view_mode
   *   (optional) The view mode to use for rendering.
   * @param bool $reset
   *   (optional) Whether to reset the test_entity controller cache. Defaults to
   *   TRUE to simplify testing.
   */
  protected function renderTestEntity($id, $view_mode = 'full', $reset = TRUE) {
    if ($reset) {
      entity_get_controller('test_entity')->resetCache(array($id));
    }
    $entity = field_test_entity_test_load($id);
    field_attach_prepare_view('test_entity', array($entity->id() => $entity), $view_mode);
    $entity->content = field_attach_view('test_entity', $entity, $view_mode);

    $output = drupal_render($entity->content);
    $this->drupalSetContent($output);
    $this->verbose($output);
  }
 /**
  * Builds a structured array representing the fieldable panel pane's content.
  *
  * @param object $entity
  *   A fieldable panel pane entity.
  * @param string $view_mode
  *   View mode, e.g. 'full', 'teaser'...
  * @param string $langcode
  *   (optional) A language code to use for rendering. Defaults to the global
  *   content language of the current request.
  */
 public function buildContent($entity, $view_mode = 'full', $langcode = NULL)
 {
     if (!isset($langcode)) {
         $langcode = $GLOBALS['language_content']->language;
     }
     // Remove previously built content, if exists.
     $entity->content = array();
     // Add the title so that it may be controlled via other display mechanisms.
     $entity->content['title'] = array('#theme' => 'html_tag', '#tag' => 'h2', '#value' => '');
     // Some titles link to a page.
     if (!empty($entity->title)) {
         if (!empty($entity->link) && !empty($entity->path)) {
             $entity->content['title']['#value'] = l($entity->title, $entity->path);
         } else {
             $entity->content['title']['#value'] = check_plain($entity->title);
         }
     }
     // Allow modules to change the view mode, trigger
     // hook_entity_view_mode_alter().
     $context = array('entity_type' => 'fieldable_panels_pane', 'entity' => $entity, 'langcode' => $langcode);
     drupal_alter('entity_view_mode', $view_mode, $context);
     // Build fields content.
     field_attach_prepare_view('fieldable_panels_pane', array($entity->fpid => $entity), $view_mode, $langcode);
     entity_prepare_view('fieldable_panels_pane', array($entity->fpid => $entity), $langcode);
     $entity->content += field_attach_view('fieldable_panels_pane', $entity, $view_mode, $langcode);
     // Allow modules to make their own additions to the entity.
     module_invoke_all('fieldable_panels_pane_view', $entity, $view_mode, $langcode);
     module_invoke_all('entity_view', $entity, 'fieldable_panels_pane', $view_mode, $langcode);
     // Make sure the current view mode is stored if no module has already
     // populated the related key.
     $entity->content += array('#view_mode' => $view_mode);
 }
 /**
  * Builds a structured array representing the button content.
  *
  * @param object $entity
  *   A button entity.
  * @param string $view_mode
  *   View mode, e.g. 'full', 'teaser'...
  * @param string $langcode
  *   (optional) A language code to use for rendering. Defaults to the global
  *   content language of the current request.
  */
 public function buildContent($entity, $view_mode = 'full', $langcode = NULL)
 {
     if (!isset($langcode)) {
         $langcode = $GLOBALS['language_content']->language;
     }
     // Remove previously built content, if exists.
     $entity->content = array();
     // Allow modules to change the view mode.
     $context = array('entity_type' => 'command_button', 'entity' => $entity, 'langcode' => $langcode);
     drupal_alter('entity_view_mode', $view_mode, $context);
     // Build fields content.
     field_attach_prepare_view('command_button', array($entity->bid => $entity), $view_mode, $langcode);
     entity_prepare_view('command_button', array($entity->bid => $entity), $langcode);
     $entity->content += field_attach_view('command_button', $entity, $view_mode, $langcode);
     // Allow modules to make their own additions to the entity.
     module_invoke_all('command_button_view', $entity, $view_mode, $langcode);
     module_invoke_all('entity_view', $entity, 'command_button', $view_mode, $langcode);
     // Make sure the current view mode is stored if no module has already
     // populated the related key.
     $entity->content += array('#view_mode' => $view_mode);
 }