{"id":117,"date":"2008-10-17T14:49:18","date_gmt":"2008-10-17T13:49:18","guid":{"rendered":"http:\/\/vince.tikasz.hu\/?p=117"},"modified":"2011-07-24T15:13:14","modified_gmt":"2011-07-24T13:13:14","slug":"drupal-kifejezesek-szotar-szerint","status":"publish","type":"post","link":"https:\/\/vince.tikasz.hu\/2008\/10\/17\/drupal-kifejezesek-szotar-szerint\/","title":{"rendered":"Drupal kifejez\u00e9sek sz\u00f3t\u00e1r szerint"},"content":{"rendered":"

M\u00e1r nem el\u0151sz\u00f6r futok bele a probl\u00e9m\u00e1ba, hogy egy-egy tartalom megjelen\u00edt\u00e9sekor a Drupal az \u00f6sszes kifejez\u00e9st (taxonomy – term) \u00f6mlesztve, egy list\u00e1ban nyomja ki, de csak most volt annyira fontos, hogy megold\u00e1st keressek. M\u00e1snak is sz\u00fcks\u00e9ge lehetett erre, mert a google:\/\/drupal+terms+by+vocabulary<\/a> els\u0151 k\u00e9t tal\u00e1lata (f\u0151leg a m\u00e1sodik<\/a>) haszn\u00e1lhat\u00f3 megold\u00e1st adott.
\n
\nEl\u0151sz\u00f6r az aktu\u00e1lis smink template.php<\/kbd> \u00e1llom\u00e1ny\u00e1ba kell egy \u00faj f\u00fcggv\u00e9nyt l\u00e9trehozni, ami egy node azonos\u00edt\u00f3t (nid) v\u00e1r param\u00e9terk\u00e9nt.<\/p>\n

function phptemplate_print_terms( $nid ) {\r\n    $vocabularies = taxonomy_get_vocabularies();\r\n    $output = '<ul>';\r\n    foreach( $vocabularies as $vocabulary ) {\r\n        if ( $vocabularies ) {\r\n            $terms = taxonomy_node_get_terms_by_vocabulary( $nid, $vocabulary->vid );\r\n            if ( $terms ) {\r\n                $links = array();\r\n                $output .= '<li><strong>' . $vocabulary->name . '<\/strong>: ';\r\n                foreach ( $terms as $term ) {\r\n                    $links[ 'taxonomy_term_'. $term->tid ] = array(\r\n                        'title' => $term->name,\r\n                        'href' => taxonomy_term_path($term),\r\n                        'atributes' => array(\r\n                            'rel' => 'tag',\r\n                            'title' => strip_tags($term->description)\r\n                        )\r\n                    );\r\n                }\r\n                $output .= theme('links', $links);\r\n                $output .= '<\/li>';\r\n            }\r\n        }\r\n    }\r\n    $output .= '<\/ul>';\r\n    return $output;\r\n}<\/pre>\n

Majd a a node.tpl.php<\/kbd> a megfelel\u0151 helyen ki kell nyomni<\/p>\n

<div class=\"terms_by_vocab\">\r\n<?php echo phptemplate_print_terms( $nid ) ?>\r\n<\/div><\/pre>\n

Vo\u00e1l\u00e1<\/p>\n","protected":false},"excerpt":{"rendered":"

M\u00e1r nem el\u0151sz\u00f6r futok bele a probl\u00e9m\u00e1ba, hogy egy-egy tartalom megjelen\u00edt\u00e9sekor a Drupal az \u00f6sszes kifejez\u00e9st (taxonomy – term) \u00f6mlesztve, egy list\u00e1ban nyomja ki, de csak most volt annyira fontos, hogy megold\u00e1st keressek. M\u00e1snak is sz\u00fcks\u00e9ge lehetett erre, mert a … Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,8],"tags":[73,83,46,68],"_links":{"self":[{"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/posts\/117"}],"collection":[{"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":0,"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vince.tikasz.hu\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}