{"id":80,"date":"2011-04-16T14:28:34","date_gmt":"2011-04-16T12:28:34","guid":{"rendered":"http:\/\/my-opinions.info\/?p=80"},"modified":"2011-04-16T23:52:49","modified_gmt":"2011-04-16T21:52:49","slug":"peresobrat-content-drupal","status":"publish","type":"post","link":"https:\/\/uw-t.com\/en\/drupal\/peresobrat-content-drupal","title":{"rendered":"Rebuild $content $vars[&#8216;content&#8217;] Drupal"},"content":{"rendered":"<p>That is needed to rebuild the $ content variable in taksomanii,<br \/>\nLink taksomanii was such a<br \/>\ntaxonomy\/term\/1<br \/>\nthe output was supposed to get here this html one record<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;div class=&quot;news-item&quot;&gt;\r\n\t\t\t\t  &lt;div class=&quot;date&quot;&gt;&lt;i&gt;04&lt;\/i&gt;\u0430\u043f\u0440&lt;\/div&gt;\r\n\t\t\t\t  &lt;div class=&quot;news-block&quot;&gt;\r\n\t\t\t\t\t&lt;p class=&quot;title&quot;&gt;&lt;a href=&quot;node\/7&quot;&gt;\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u044d\u043b\u043b\u0438\u043f\u0441\u043e\u0438\u0434\u043e\u0432. \u0421 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0432\u044f\u0437\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u0438\u043a\u043e\u0439 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439.\r\n\t\t\t\t&lt;\/p&gt;\r\n\t\t\t\t\t&lt;p class=&quot;more&quot;&gt;&lt;a &quot;=&quot;&quot; href=&quot;node\/7&quot;&gt;\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435&lt;\/a&gt;&lt;\/p&gt;\r\n\t\t\t\t  &lt;div class=&quot;line&quot;&gt;&lt;\/div&gt;\r\n\t\t\t\t&lt;\/div&gt;\r\n\t\t\t\t&lt;\/div&gt;\r\n<\/pre>\n<p><!--more--><br \/>\nWell, as always, long pull, take a tambourine, trayasu him several times in the head comes to mind as razporot DRUPALu intestine,<br \/>\nTake the sword Jedi entitled Nodepad + + open a file template.php (it's located in the folder with the template, if not then create it)<br \/>\nAnd here we enter a function there<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">    if (arg(0) == 'taxonomy' &amp;&amp; arg(1) == 'term' &amp;&amp; arg(2) == '1')\r\n    {\r\n\t\t$month&#x5B;&quot;01&quot;] = &quot;\u044f\u043d\u0432&quot;;$month&#x5B;&quot;02&quot;] = &quot;\u0444\u0435\u0432&quot;;$month&#x5B;&quot;03&quot;] = &quot;\u043c\u0430\u0440\u0442&quot;;$month&#x5B;&quot;04&quot;] = &quot;\u0430\u043f\u0440&quot;;$month&#x5B;&quot;05&quot;] = &quot;\u043c\u0430\u0439&quot;;$month&#x5B;&quot;06&quot;] = &quot;\u0438\u044e\u043d\u044c&quot;;$month&#x5B;&quot;07&quot;] = &quot;\u0438\u044e\u043b\u044c&quot;;$month&#x5B;&quot;08&quot;] =&quot;\u0430\u0432\u0433\u0443\u0441\u0442&quot;;$month&#x5B;&quot;09&quot;] = &quot;\u0441\u0435\u043d\u0442&quot;;$month&#x5B;&quot;10&quot;] = &quot;\u043e\u043a\u0442&quot;;$month&#x5B;&quot;11&quot;] = &quot;\u043d\u043e\u044f&quot;;$month&#x5B;&quot;12&quot;] = &quot;\u0434\u0435\u043a&quot;;\r\n\t\tif ($title): print '&lt;h1&gt;'. $title .'&lt;\/h1&gt;'; endif;\r\n\t\t\t$result = taxonomy_select_nodes(array(arg(2)));\r\n\t\t\twhile ($node = db_fetch_object($result)) {\r\n\t\t\t  $output .= '\r\n\t\t\t\t&lt;div class=&quot;news-item&quot;&gt;\r\n\t\t\t\t  &lt;div class=&quot;date&quot;&gt;' . date(&quot;&lt;\\i&gt;d&lt;\/\\i&gt;&quot;,$node-&gt;created).$month&#x5B;date(&quot;m&quot;,$node-&gt;created-1)]. '&lt;\/div&gt;\r\n\t\t\t\t  &lt;div class=&quot;news-block&quot;&gt;\r\n\t\t\t\t\t&lt;p class=&quot;title&quot;&gt;'.l($node-&gt;title, 'node\/'.$node-&gt;nid).'&lt;\/p&gt;\r\n\t\t\t\t\t' . node_load($node-&gt;nid)-&gt;teaser . '\r\n\t\t\t\t\t&lt;p class=&quot;more&quot;&gt;'.l(t('Read more'), 'node\/'.$node-&gt;nid).'&lt;\/p&gt;\r\n\t\t\t\t  &lt;div class=&quot;line&quot;&gt;&lt;\/div&gt;\r\n\t\t\t\t&lt;\/div&gt;\r\n\t\t\t\t&lt;\/div&gt;\r\n\t\t\t  ';\r\n\t\t\t}\r\n\t\t\t$vars&#x5B;'content'] = $output;\r\n\t}}\r\n<\/pre>\n<p>If a little bit more then here so<br \/>\nThis line determines what <\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">if (arg(0) == 'taxonomy' &amp;&amp; arg(1) == 'term' &amp;&amp; arg(2) == '1')<\/pre>\n<p>Seeds that will only handle a specific taksomanii<br \/>\nNext<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">$result = taxonomy_select_nodes(array(arg(2)));<\/pre>\n<p>Choose properties taksomanii, will choose only the title, create, id<br \/>\nbut as we get a teaser<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">node_load($node-&gt;nid)-&gt;teaser<\/pre>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>That is needed to rebuild the $ content variable in taksomanii, Link taksomanii was such a taxonomy\/term\/1 the output was supposed to get here this html one record &lt;div class=&quot;news-item&quot;&gt; &lt;div class=&quot;date&quot;&gt;&lt;i&gt;04&lt;\/i&gt;\u0430\u043f\u0440&lt;\/div&gt; &lt;div class=&quot;news-block&quot;&gt; &lt;p class=&quot;title&quot;&gt;&lt;a href=&quot;node\/7&quot;&gt;\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u044d\u043b\u043b\u0438\u043f\u0441\u043e\u0438\u0434\u043e\u0432. \u0421 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0432\u044f\u0437\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, &hellip; <a href=\"https:\/\/uw-t.com\/en\/drupal\/peresobrat-content-drupal\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Rebuild $content $vars[&#8216;content&#8217;] Drupal<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-80","post","type-post","status-publish","format-standard","hentry","category-drupal"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/posts\/80","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":16,"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":97,"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/posts\/80\/revisions\/97"}],"wp:attachment":[{"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uw-t.com\/en\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}