Example #1
0
?>
</a></div>
<div class="dropdown language_flag">
  <button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    <a href="#"><img src="<?php 
echo $base_url . '/' . path_to_theme() . '/images/' . $language->language . '.png';
?>
" alt="" /></a>
    <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" aria-labelledby="dLabel">
<?php 
foreach ($languages as $key => $value) {
    if ($value != $language->language) {
        if ($arg0 == 'node' && is_numeric($arg1)) {
            $trans_nid = translation_node_get_from_lang($arg1, $value);
            //echo drupal_get_path_alias('node/'.$trans_nid, $value);
            ?>
        <li><a href="<?php 
            echo $base_url . '/' . $value . '/node/' . $trans_nid;
            ?>
"><img src="<?php 
            echo $base_url . '/' . path_to_theme() . '/images/' . $value . '.png';
            ?>
" alt="" /></a></li>
<?php 
        } else {
            ?>
      <li><a href="<?php 
            echo $base_url . '/' . $value . '/' . $lang;
            ?>
      </a>
  </div>
</div>

<div class="Les_Temps_forts_slider">
<h2><?php 
echo $current_node->field_thematic_issues_title['und'][0]['value'];
?>
</h2>

<div id="carousel-example-generic" class="carousel slide slider_back" data-ride="carousel">
  <div class="carousel-inner" role="listbox">
  <!-- Wrapper for slides -->
<?php 
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')->entityCondition('bundle', 'events')->fieldCondition('field_event_type', 'nid', translation_node_get_from_lang($current_node->nid, 'en'))->propertyCondition('status', NODE_PUBLISHED)->propertyCondition('language', $language->language)->range(0, 4);
$result = $query->execute();
// echo "<pre>";
// print_r($result['node']);
// echo "</pre>";
if (isset($result['node'])) {
    $active = true;
    $new_items_nids = array_keys($result['node']);
    foreach ($new_items_nids as $key => $value) {
        $the_node = node_load($value);
        ?>
    <div class="item <?php 
        if ($active) {
            echo 'active';
            $active = false;
        }