hello

if i do print_r($node) i get

    [field_tax_linktags] => Array
        (
            [0] => Array
                (
                    [value] => 166
                )

            [1] => Array
                (
                    [value] => 183
                )

        )

    [tags] => Array
        (
            [6] => Array
                (
                    [166] => stdClass Object
                        (
                            [tid] => 166
                            [vid] => 6
                            [name] => Fotos
                            [description] => 
                            [weight] => 0
                        )

                    [183] => stdClass Object
                        (
                            [tid] => 183
                            [vid] => 6
                            [name] => Suburbia
                            [description] => 
                            [weight] => 0
                        )

                )

        )

how to print it in a way that all categories are printed like taxonomies (like print $terms) for example "Fotos" and "Suburbia"?

other cck-fields i can print like $node->field_link_link_url[0]['url'] but i doesn't manage with content taxonomy ...

thanks and greetings momper

Comments

momper’s picture

no idea?

thanks and greetings momper

mh86’s picture

Status: Active » Fixed

try following:

foreach ($node->field_tax_linktags as $delta => $value) {
  $term = taxonomy_get_term($node->field_tax_linktags[$delta]['value']);
  $term_name = check_plain($term->name);
  ...
}

I'm normally not writing templates, but shouldn't there be a 'view' or 'safe' entry in the $node->field.... which does the check_plain, handling of multiple terms, links etc. ?

momper’s picture

i tried this - perfect :) - but i'm sorry - ähem - i don't manage to make them to links ...
a small,small hint?

thanks a lot and greetings momper

mh86’s picture

$link = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => $term->description));
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.