Программное выведение значения поля таксономии материла

Главные вкладки

Аватар пользователя alex-litvinov alex-litvinov 31 октября 2021 в 4:42

Добрый день, необходимо вывести в определенное место значения поля, "Тип поля" в материале "Ссылка на термин", использовал следующий код:
<?php print render($node->field_catalog_list['und'][0]['taxonomy_term']['name']); ?>

Не выводит значение.

Это структура данного поля:

<?php

    

[field_catalog_list] => Array
        (
            [
und] => Array
                (
                    [
0] => Array
                        (
                            [
tid] => 7054
                            
[taxonomy_term] => stdClass Object
                                
(
                                    [
tid] => 7054
                                    
[vid] => 2
                                    
[name] => Great Wall
                                    
[description] => 
                                    [
format] => moderfil
                                    
[weight] => 0
                                    
[vocabulary_machine_name] => marka_avto
                                    
[field_ikon_tax] => Array
                                        (
                                        )

                                    [

metatags] => Array
                                        (
                                            [
und] => Array
                                                (
                                                    [
geshifilter-robots] =&gt; Array&#10;                                                        (&#10;                                                            [value] =&gt; Array&#10;                                                                (&#10;                                                                    [index] =&gt; index&#10;                                                                    [follow] =&gt; follow&#10;                                                                    [noindex] =&gt; 0&#10;                                                                    [nofollow] =&gt; 0&#10;                                                                    [noarchive] =&gt; 0&#10;                                                                    [nosnippet] =&gt; 0&#10;                                                                    [noodp] =&gt; 0&#10;                                                                    [noydir] =&gt; 0&#10;                                                                    [noimageindex] =&gt; 0&#10;                                                                    [notranslate] =&gt; 0&#10;                                                                )&#10;&#10;                                                        )&#10;&#10;                                                )&#10;&#10;                                        )&#10;&#10;                                    [rdf_mapping] =&gt; Array&#10;                                        (&#10;                                            [rdftype] =&gt; Array&#10;                                                (&#10;                                                    [0] =&gt; skos:Concept&#10;                                                )&#10;&#10;                                            [name] =&gt; Array&#10;                                                (&#10;                                                    [predicates] =&gt; Array&#10;                                                        (&#10;                                                            [0] =&gt; rdfs:label&#10;                                                            [1] =&gt; skos:prefLabel&#10;                                                        )&#10;&#10;                                                )&#10;&#10;                                            [description] =&gt; Array&#10;                                                (&#10;                                                    [predicates] =&gt; Array&#10;                                                        (&#10;                                                            [0] =&gt; skos:definition&#10;                                                        )&#10;&#10;                                                )&#10;&#10;                                            [vid] =&gt; Array&#10;                                                (&#10;                                                    [predicates] =&gt; Array&#10;                                                        (&#10;                                                            [0] =&gt; skos:inScheme&#10;                                                        )&#10;&#10;                                                    [type] =&gt; rel&#10;                                                )&#10;&#10;                                            [parent] =&gt; Array&#10;                                                (&#10;                                                    [predicates] =&gt; Array&#10;                                                        (&#10;                                                            [0] =&gt; skos:broader&#10;                                                        )&#10;&#10;                                                    [type] =&gt; rel&#10;                                                )&#10;&#10;                                        )&#10;&#10;                                    [path] =&gt; Array&#10;                                        (&#10;                                            [pathauto] =&gt; 1&#10;                                        )&#10;&#10;                                )&#10;&#10;                            [name] =&gt; &#10;                        )&#10;&#10;                )&#10;&#10;        )?>

[/geshifilter-robots]

Лучший ответ

Комментарии