<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Templates on Jeremy Jackson</title>
    <link>https://new.tsjee.ru/tags/templates/</link>
    <description>Recent content in Templates on Jeremy Jackson</description>
    <generator>Hugo</generator>
    <language>ru</language>
    <lastBuildDate>Tue, 20 Sep 2011 09:08:12 +0000</lastBuildDate>
    <atom:link href="https://new.tsjee.ru/tags/templates/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Шаблон то типу ноды и ее номеру</title>
      <link>https://new.tsjee.ru/posts/2011-09-20-%D1%88%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD-%D1%82%D0%BE-%D1%82%D0%B8%D0%BF%D1%83-%D0%BD%D0%BE%D0%B4%D1%8B-%D0%B8-%D0%B5%D0%B5-%D0%BD%D0%BE%D0%BC%D0%B5%D1%80%D1%83/</link>
      <pubDate>Tue, 20 Sep 2011 09:08:12 +0000</pubDate>
      <guid>https://new.tsjee.ru/posts/2011-09-20-%D1%88%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD-%D1%82%D0%BE-%D1%82%D0%B8%D0%BF%D1%83-%D0%BD%D0%BE%D0%B4%D1%8B-%D0%B8-%D0%B5%D0%B5-%D0%BD%D0%BE%D0%BC%D0%B5%D1%80%D1%83/</guid>
      <description>&lt;p&gt;Для использования следующих названий шаблонов для страниц определенного типа или номера:&lt;/p&gt;&#xA;&lt;p&gt;page&amp;ndash;type&amp;ndash;blog.tpl.php и page&amp;ndash;node&amp;ndash;2.tpl.php,&lt;/p&gt;&#xA;&lt;p&gt;следует прописать следующий код в template.php&lt;/p&gt;&#xA;&lt;p&gt;function mytheme_preprocess_page(&amp;amp;$variables, $hook) {&#xA;//some other stuff&#xA;if (isset($variables[&amp;rsquo;node&amp;rsquo;])) {&lt;br&gt;&#xA;$variables[&amp;rsquo;theme_hook_suggestions&amp;rsquo;][] = &amp;lsquo;page__type__&amp;rsquo;. $variables[&amp;rsquo;node&amp;rsquo;]-&amp;gt;type;&#xA;$variables[&amp;rsquo;theme_hook_suggestions&amp;rsquo;][] = &amp;ldquo;page__node__&amp;rdquo; . $variables[&amp;rsquo;node&amp;rsquo;]-&amp;gt;nid;&#xA;}&#xA;}&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
