<?php /** * @file * Default simple view template to display a list of rows. * * - $title : The title of this group of rows. May be empty. * - $options['type'] will either be ul or ol. * @ingroup views_templates */ ?> <ul> <?php foreach ($view->result as $id => $row) { ?> <?php print '<li class="cat-item">'; print '<a href="/' . taxonomy_term_uri($row->_entity_properties['entity object'])['path'] . '">' . $row->_entity_properties['entity object']->name . '</a>'; print '</li>'; ?> <?php } ?> </ul>
?> </a></span> </div> </div> <?php } ?> <?php if (isset($entity->field_section_new[$entity->language])) { print '<pre>'; foreach ($entity->field_section_new[$entity->language] as $tid) { $term = taxonomy_term_load($tid); // load term object $term_uri = taxonomy_term_uri($term); // get array with path $term_title = taxonomy_term_title($term); $term_path = $term_uri['path']; $link = l($term_title, $term_path); print '$term ' . $term . '<br />'; print '$term_uri ' . $term_uri . '<br />'; print '$term_title ' . $term_title . '<br />'; print '$term_path ' . $term_path . '<br />'; print '$link ' . $link . '<br />'; print_r($term_uri); } print '</pre>'; } ?>
/** * Return a themed breadcrumb trail. * * @param $breadcrumb * An array containing the breadcrumb links. * @return a string containing the breadcrumb output. */ function burzenski_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; $breadcrumb[] = l(drupal_get_title(), $_GET["q"]); //die(var_dump($breadcrumb)); //die(var_dump($breadcrumb)); if (!empty($breadcrumb)) { $output = '<ul>'; $first = true; foreach ($breadcrumb as $key => $value) { $string = $value; $value = htmlspecialchars_decode($string); $copy_1 = $value; $copy_2 = $value; if ($first) { $output .= '<li>' . $value . '</li>'; $first = false; } else { $next = false; if (strpos($value, '/blog/all') !== false) { //-> Tiene la cadena //-> Verificamos si es All if (strpos($value, 'blog/all">Blog') !== false || strpos($value, '/blog/all"') !== false) { //-> Procesamos este enlace $term_title = "All"; $pos = strpos($value, ">"); $innerText = substr($value, $pos + 1, strlen($value) - $pos - 5); $newValue = $term_title; $value = str_replace($innerText, $newValue, $value); $output .= '<li>></li><li>' . decode_entities($value) . '</li>'; } else { //-> Tomamos el termino id y buscamos el nombre if (strpos($value, '/blog/all/') !== false) { $tid = str_replace('blog/all/', "", $_GET["q"]); $term = taxonomy_term_load($tid); // load term object $term_uri = taxonomy_term_uri($term); // get array with path $term_title = ucfirst(taxonomy_term_title($term)); if (!empty($term_title)) { $pos = strpos($value, ">"); $innerText = substr($value, $pos + 1, strlen($value) - $pos - 5); $newValue = $term_title; $value = str_replace($innerText, $newValue, $value); $output .= '<li>></li><li>' . decode_entities($value) . '</li>'; } else { $next = true; } } else { $next = true; } } } else { $next = true; } if ($next) { $pos = strpos($value, ">"); $innerText = substr($value, $pos + 1, strlen($value) - $pos - 5); if (strlen($innerText) > 45) { $newValue = substr($innerText, 0, 42) . "..."; $value = str_replace($innerText, $newValue, $value); } $output .= '<li>></li><li>' . decode_entities($value) . '</li>'; } } } $output .= '</ul>'; return $output; } }
function _bvng_get_tag_links(&$field_items, &$item_list) { $terms = taxonomy_term_load_multiple($field_items); foreach ($terms as $term) { $uri = taxonomy_term_uri($term); $tag_link = l($term->name, $uri['path']); array_push($item_list['items'], array('data' => $tag_link)); } }
<?php /** * @file * Default simple view template to display a list of rows. * * - $title : The title of this group of rows. May be empty. * - $options['type'] will either be ul or ol. * @ingroup views_templates */ ?> <div class="tagcloud"> <?php foreach ($view->result as $id => $row) { ?> <?php print '<a href="/' . taxonomy_term_uri($row->_entity_properties['entity object'])['path'] . '" class="tag-link-' . $row->node_taxonomy_index_nid . '" title="' . $row->node_taxonomy_index_nid . ' topics" style="font-size: ' . ($row->node_taxonomy_index_nid / 2 + 8) . 'pt;">' . $row->taxonomy_term_data_name . '</a>'; ?> <?php } ?> </div>
<?php /** * @file * Default simple view template to display a list of rows. * * - $title : The title of this group of rows. May be empty. * - $options['type'] will either be ul or ol. * @ingroup views_templates */ ?> <ul class="nav"> <?php foreach ($view->result as $id => $row) { ?> <?php print '<li>'; print '<a href="/' . taxonomy_term_uri($row->_entity_properties['entity object'])['path'] . '"><span class="glyphicon glyphicon-list"></span> ' . $row->_entity_properties['entity object']->name . '</a>'; print '</li>'; ?> <?php } ?> </ul>