Hi, brilliant theme, many thanks in advance.

I would like to achieve the following exactly, not colors but layout of taxonomy as per the attached files. The one i would like to achieve with Newsflash is inspired from Inf08 theme. Kindly advise how can I achieve this, thank you very much.

kindly note that I am not expert, but if you can guide me, I will do exactly as told, thank you in advance.

Best regards
Danish

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

macrodesign’s picture

macrodesign’s picture

I posted a request at Inf08 #567186: How to achieve this? and got a quick reply; please read and advise how can I use it with Newsflash.
n.b. please note that I can only follow what you can guide me, cannot write my own code

[Reply]

Hi,

Thanks for the feedback. I'm glad you like it :)

Everything is located in the template.php file (except the theme settings, of course). For taxonomy terms layout it's being processed in phptemplate_preprocess_node() function around line 144~190.

What I think you'd be interested most is the block around line 157~187 which takes care of splitting the taxonomy terms into two groups -- the "category" that is displayed along with submitted information ($vars['category']), and other "tags" that is displayed at the bottom of the node ($vars['terms']).

The code around 144~190 is as follows:

// format taxonomy list, code adapted from "Acquia Marina" theme
if (module_exists('taxonomy')) {
$vocabularies = taxonomy_get_vocabularies($vars['node']->type);
$output = '';
$vocab_delimiter = '';

$category_content_type = (theme_get_setting('category_enable_content_type') == 1) ? $vars['node']->type : 'default';
$category_setting = theme_get_setting('category_'. $category_content_type);

foreach ($vocabularies as $vocabulary) {
$terms = taxonomy_node_get_terms_by_vocabulary($vars['node'], $vocabulary->vid);

if ($terms) {
if ($vocabulary->vid != $category_setting) {
$output .= '

  • vid .'">'. $vocabulary->name .': ';
    $links = array();

    foreach ($terms as $term) {
    $links[] = l($term->name, taxonomy_term_path($term), array('attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description))));
    }

    $output .= implode(", ", $links);
    $output .= '

  • ';
    }
    // Special case for vocabulary named "Category"
    else {
    $links = array();

    foreach ($terms as $term) {
    $links[] = l($term->name, taxonomy_term_path($term), array('attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description))));
    }

    $category .= implode(", ", $links);
    $vars['category'] = t(' in ') . $category;
    }
    }
    }

    if ($output != '') {
    $output = '

      '. $output .'

    ';
    }

    $vars['terms'] = $output;
    }
    else {
    $vars['terms'] = '';
    }
    }

    macrodesign’s picture

    Title: Taxonomy tags theming request » Taxonomy tags theming URGENT request
    Priority: Normal » Critical

    sorry to mark this urgent / critical to get someone's attention as I will be traveling in 3 days and won't be back to work until 1 month; kindly help me.

    macrodesign’s picture

    any one please?

    macrodesign’s picture

    anyone??? help please

    Kisugi Ai’s picture

    Status: Active » Closed (fixed)

    closed -- issue fixed for 2 weeks with no activity.