<?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/524/</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 #8598)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/524/#comment8598</guid>
					<link>http://79.174.14.219/524.html#comment8598</link>
					<author>1099511627776@mail.ru</author>
					<description><![CDATA[Делается доп. поле к топику «Тизер» а в шаблоне выводится <br/>
<pre class="prettyprint"><code>{if $bTopicList}
    {$oTopic-&gt;getField('tizer')-&gt;getValue()}
{else}
    {$oTopic-&gt;getText()}
{/if}</code></pre><br/>
код условный. То же касается и самого шаблона (стиля) в topic_part_header.tpl и везде где надо (topic_part_footer.tpl, topic_topic.tpl............)<br/>
<pre class="prettyprint"><code>{if $bTopicList}
 ........шаблон для краткой новости ()
{else}
 ........шаблон для полной новости () 
{/if}</code></pre>]]></description>
					<pubDate>Thu, 27 Feb 2014 16:13:31 +0400</pubDate>
									</item>
							<item>
					<title>Как сделать разные полную и краткую новости? (comment #8614)</title>
					<guid isPermaLink="true">http://79.174.14.219/t/524/#comment8614</guid>
					<link>http://79.174.14.219/524.html#comment8614</link>
					<author>x-the@mail.ru</author>
					<description><![CDATA[а если так, создаю файл шаблона <strong>topic_main.tpl</strong><br/>
в него вписываю:<br/>
<pre class="prettyprint"><code>{assign var=&quot;oBlog&quot; value=$oTopic-&gt;getBlog()}
{assign var=&quot;oUser&quot; value=$oTopic-&gt;getUser()}
{assign var=&quot;oVote&quot; value=$oTopic-&gt;getVote()}
&lt;div class=&quot;m-news {if $oTopic-&gt;getType()=='photoset' or $oTopic-&gt;getPreviewImage()}photo1{else}news{/if} {if Config::Get('plugin.simpletpl.show_titletwo')}titletwo{/if}&quot;&gt;

{assign var=oType value=$oTopic-&gt;getContentType()}




    &lt;div class=&quot;m-block&quot;&gt;


	


		{assign var=oMainPhoto value=$oTopic-&gt;getPhotosetMainPhoto()}
	        {if $oMainPhoto}
			&lt;div class=&quot;m-img&quot; onclick=&quot;window.location='{$oTopic-&gt;getUrl()}'&quot;&gt;
				&lt;div class=&quot;topic-photo-count&quot; id=&quot;photoset-photo-count-{$oTopic-&gt;getId()}&quot;&gt;&lt;span&gt;{$oTopic-&gt;getPhotosetCount()}&lt;/span&gt;&lt;/div&gt;
		              &lt;img src=&quot;{$oMainPhoto-&gt;getWebPath('230crop')}&quot; alt=&quot;{$oTopic-&gt;getTitle()}&quot; id=&quot;photoset-main-image-{$oTopic-&gt;getId()}&quot; /&gt;
			&lt;/div&gt;
		{elseif $oTopic-&gt;getPreviewImage()}
			&lt;div class=&quot;m-img&quot; onclick=&quot;window.location='{$oTopic-&gt;getUrl()}'&quot;&gt;
				&lt;img src=&quot;{$oTopic-&gt;getPreviewImageWebPath('230crop')}&quot; alt=&quot;{$oTopic-&gt;getTitle()}&quot; /&gt;
			&lt;/div&gt;
		{/if}

	&lt;div class=&quot;m-info&quot;&gt;
	&lt;span class=&quot;m-cat&quot;&gt;&lt;a href=&quot;{$oBlog-&gt;getUrlFull()}&quot;&gt;{$oBlog-&gt;getTitle()|escape:'html'}&lt;/a&gt;&lt;/span&gt;
	&lt;/div&gt;

 
	
       &lt;div class=&quot;m-title&quot;&gt;
       &lt;a href=&quot;{$oTopic-&gt;getUrl()}&quot;&gt;{$oTopic-&gt;getTitle()|truncate:50|escape:'html'}&lt;/a&gt;
       &lt;/div&gt;

	&lt;div class=&quot;m-info-2&quot;&gt;	
	&lt;span class=&quot;m-view&quot;&gt;{$oTopic-&gt;getCountRead()}&lt;/span&gt;
	&lt;span class=&quot;m-com&quot;&gt;&lt;a href=&quot;{$oTopic-&gt;getUrl()}#comments&quot;&gt;{$oTopic-&gt;getCountComment()}&lt;/a&gt;&lt;/span&gt;
	&lt;/div&gt; 
	
    &lt;/div&gt;


&lt;/div&gt;</code></pre><br/>
<br/>
После чего в <strong>topic_list.tpl</strong><br/>
добавляю код<br/>
<pre class="prettyprint"><code>{if count($aTopics)&gt;0}
	

{if ($sAction=='index' and $sEvent=='') or !Config::Get('plugin.simpletpl.show_thumbs_only_index')}
        &lt;ul class=&quot;topics-short&quot;&gt;
            {foreach from=$aTopics item=oTopic}
        		{if $LS-&gt;Topic_IsAllowTopicType($oTopic-&gt;getType())}
        			{assign var=&quot;sTopicTemplateName&quot; value=&quot;topic_`$oTopic-&gt;getType()`.tpl&quot;}
            	    {include file=&quot;topic_main.tpl&quot;}
        		{/if}
        	{/foreach}
        &lt;/ul&gt;
    {else}

	{foreach from=$aTopics item=oTopic}
		{if $LS-&gt;Topic_IsAllowTopicType($oTopic-&gt;getType())}
			{assign var=&quot;sTopicTemplateName&quot; value=&quot;topic_topic.tpl&quot;}
			{include file=$sTopicTemplateName bTopicList=true}
		{/if}
	{/foreach}
{/if}

	{include file='paging.tpl' aPaging=$aPaging}
{else}
	{$aLang.blog_no_topic}
{/if}


</code></pre><br/>
]]></description>
					<pubDate>Fri, 28 Feb 2014 00:29:06 +0400</pubDate>
									</item>
					</channel>
	</rss>
