<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
			<channel>
			<title>Как отключить Теги в определенном типе контенте / Вопросы, проблемы и их решения / Alto CMS</title>
			<link>http://79.174.14.219/comments/169/</link>
			<description><![CDATA[На своем проекте в одном типе контента надо отключить теги, а в другом типе оставить. Как это можно сделать? Или]]></description>
			<language>ru</language>
			<managingEditor>noreply@altocms.ru</managingEditor>
			<webMaster>noreply@altocms.ru</webMaster>
			<generator>Alto CMS v.1.5.0b1</generator>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #2467)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment2467</guid>
					<link>http://79.174.14.219/169.html#comment2467</link>
					<author>alex.fatyeev@gmail.com</author>
					<description><![CDATA[ИМХО, самый простой вариант — вставить проверку в шаблон на тип контента. Если тип контента такой-то, то выводить поле заполнения тегов, если тип контента иной — не выводить поле заполнения тегов.<br/>
Аналогично с дизайном.]]></description>
					<pubDate>Wed, 05 Jun 2013 13:18:39 +0400</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #2469)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment2469</guid>
					<link>http://79.174.14.219/169.html#comment2469</link>
					<author>garri.83@mail.ru</author>
					<description><![CDATA[А можно поподробнее, а то я в коде не супер, да и с движком как неделю работать стал. Еще в структуре даже не очень разобрался.]]></description>
					<pubDate>Wed, 05 Jun 2013 13:37:13 +0400</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #2470)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment2470</guid>
					<link>http://79.174.14.219/169.html#comment2470</link>
					<author>alex.fatyeev@gmail.com</author>
					<description><![CDATA[Ищите файл скина: <pre class="prettyprint"><code>/templates/skin/mono/actions/ActionContent/add.tpl</code></pre><br/>
<br/>
В нем строки <br/>
<pre class="prettyprint"><code>&lt;p&gt;&lt;label for=&quot;topic_tags&quot;&gt;{$aLang.topic_create_tags}:&lt;/label&gt;
        &lt;input type=&quot;text&quot; id=&quot;topic_tags&quot; name=&quot;topic_tags&quot; value=&quot;{$_aRequest.topic_tags}&quot; class=&quot;input-text input-width-full autocomplete-tags-sep&quot; /&gt;
        &lt;small class=&quot;note&quot;&gt;{$aLang.topic_create_tags_notice}&lt;/small&gt;&lt;/p&gt;</code></pre><br/>
<br/>
Добавляете проверку для выведения этих строк в зависимости от типа контента.]]></description>
					<pubDate>Wed, 05 Jun 2013 14:03:46 +0400</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #2477)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment2477</guid>
					<link>http://79.174.14.219/169.html#comment2477</link>
					<author>garri.83@mail.ru</author>
					<description><![CDATA[Что-то долго я тупил, но не могу разобраться. Как правильно прописать проверку?<br/>
указал так, но это не правильно <pre class="prettyprint"><code>{if $oType-&gt;topic_type('video')}</code></pre>]]></description>
					<pubDate>Wed, 05 Jun 2013 15:20:18 +0400</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #2523)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment2523</guid>
					<link>http://79.174.14.219/169.html#comment2523</link>
					<author>vladimir.o.yuriev@gmail.com</author>
					<description><![CDATA[<pre class="prettyprint"><code>{if $oType-&gt;getContentUrl()=='video'}</code></pre>]]></description>
					<pubDate>Fri, 07 Jun 2013 10:20:29 +0400</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #2524)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment2524</guid>
					<link>http://79.174.14.219/169.html#comment2524</link>
					<author>garri.83@mail.ru</author>
					<description><![CDATA[Спасибо большое. Теперь все работает на УРА]]></description>
					<pubDate>Fri, 07 Jun 2013 10:28:04 +0400</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16141)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16141</guid>
					<link>http://79.174.14.219/169.html#comment16141</link>
					<author>regamer.sayt@gmail.com</author>
					<description><![CDATA[Что то у меня это не работает.<br/>
Пишет вот что<br/>
<pre class="prettyprint"><code>Call to a member function getContentUrl() on a non-object in</code></pre>]]></description>
					<pubDate>Sun, 02 Nov 2014 16:59:47 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16142)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16142</guid>
					<link>http://79.174.14.219/169.html#comment16142</link>
					<author>andreyv@gladcode.ru</author>
					<description><![CDATA[{if $oTopic-&gt;getType!='my_new_content_type'}<br/>
Здесь выводим теги<br/>
{/if}]]></description>
					<pubDate>Sun, 02 Nov 2014 17:04:36 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16143)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16143</guid>
					<link>http://79.174.14.219/169.html#comment16143</link>
					<author>regamer.sayt@gmail.com</author>
					<description><![CDATA[Ошибки нету, но все равно выводит в остальный типах]]></description>
					<pubDate>Sun, 02 Nov 2014 17:08:04 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16145)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16145</guid>
					<link>http://79.174.14.219/169.html#comment16145</link>
					<author>andreyv@gladcode.ru</author>
					<description><![CDATA[Выложите полный кусок того кода, что у вас и название файла, в котором это делается]]></description>
					<pubDate>Sun, 02 Nov 2014 17:10:15 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16147)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16147</guid>
					<link>http://79.174.14.219/169.html#comment16147</link>
					<author>regamer.sayt@gmail.com</author>
					<description><![CDATA[<pre class="prettyprint"><code>{if $oTopic-&gt;getType!='topic'}
код
{/if}</code></pre><br/>
<br/>
это я делаю в плагине топик превью field.intro_text-edit.tpl, что бы выводился только в типе topic]]></description>
					<pubDate>Sun, 02 Nov 2014 17:15:18 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16156)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16156</guid>
					<link>http://79.174.14.219/169.html#comment16156</link>
					<author>regamer.sayt@gmail.com</author>
					<description><![CDATA[Нашел сам решение:<br/>
<pre class="prettyprint"><code>{if $oContentType-&gt;getContentUrl()=='topic'}
код
{/if}</code></pre>]]></description>
					<pubDate>Mon, 03 Nov 2014 00:10:58 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16157)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16157</guid>
					<link>http://79.174.14.219/169.html#comment16157</link>
					<author>orthograf@bk.ru</author>
					<description><![CDATA[<blockquote>{if $oTopic-&gt;getType!='my_new_content_type'}</blockquote>Андрей, вроди круглых скобок не хватает после getType — не? Может из-за этого у <a href="http://altocms.ru/profile/jangle/" class="ls-user">jangle</a> <br/>
<blockquote>Ошибки нету, но все равно выводит в остальный типах</blockquote>]]></description>
					<pubDate>Mon, 03 Nov 2014 00:41:21 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #16158)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment16158</guid>
					<link>http://79.174.14.219/169.html#comment16158</link>
					<author>andreyv@gladcode.ru</author>
					<description><![CDATA[Упс, забыл скобки, спасибо ). Отвечу чуть развёрнутее. Поступить можно двумя способами:<br/>
<br/>
Способ 1. Создать собственный шаблон для каждого типа контента. Сейчас контент всех типов выводитмся через три шаблона:<br/>
— <strong>topic.type_default-edit.tpl</strong>: шаблон страницы редактирования;<br/>
— <strong>topic.type_default-list.tpl</strong>: шаблон элемента списка;<br/>
— <strong>topic.type_default-show.tpl</strong>: шаблон страницы топика (контента);<br/>
Например, новый тип контента называется «preview», то можно скопировать эти шаблоны и в имени сменить «default» на «preview» что бы получилось так: topic.type_<strong>default</strong>-edit.tpl и т.д. Затем в этих шаблонах просто удалить вывод тегов. Получится что все типы контента будут выводится через шаблоны «default», а контент типа «preview» через свой специальный шаблон.<br/>
<br/>
Способ 2. В каждом из этих шаблонов поставить проверку на тип при выводе тегов (на примере шаблона experience):<br/>
— <strong>topic.type_default-edit.tpl</strong> в строке 98<br/>
<pre class="prettyprint"><code>{if $oContentType-&gt;getContentUrl()!='preview'}
    {include file=&quot;fields/field.tags-edit.tpl&quot;}
{/if}</code></pre><br/>
— <strong>topic.type_default-list.tpl</strong> в строке 83<br/>
<pre class="prettyprint"><code>{if $oTopic-&gt;getType()!='preview'}
    {include file=&quot;fields/field.tags-show.tpl&quot;}
{/if}</code></pre><br/>
— <strong>topic.type_default-show.tpl</strong>: в строке 161<br/>
<pre class="prettyprint"><code>{if $oTopic-&gt;getType()!='preview'}
    {include file=&quot;fields/field.tags-show.tpl&quot;}
{/if}</code></pre><br/>
<br/>
Как вариант, если типов контентов, в которых не нужно выводить теги несколько, то можно делать проверку так (здесь <em>'preview', 'note' и 'other'</em> — типы контента где НЕ нужно выводить теги):<br/>
<pre class="prettyprint"><code>{if !in_array($oTopic-&gt;getType(), ['preview', 'note', 'other'])}
    {include file=&quot;fields/field.tags-show.tpl&quot;}
{/if}</code></pre>]]></description>
					<pubDate>Mon, 03 Nov 2014 11:26:00 +0300</pubDate>
									</item>
							<item>
					<title>Как отключить Теги в определенном типе контенте (comment #2521)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/169/#comment2521</guid>
					<link>http://79.174.14.219/169.html#comment2521</link>
					<author>garri.83@mail.ru</author>
					<description><![CDATA[Люди добрые, подскажите как решить задачу.]]></description>
					<pubDate>Fri, 07 Jun 2013 09:37:04 +0400</pubDate>
									</item>
					</channel>
	</rss>
