<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум ReadyScript &mdash; Задать TITLE, Keywords, Description из .tpl]]></title>
	<link rel="self" href="https://forum.readyscript.ru/feed/atom/topic/1818/" />
	<updated>2020-04-25T03:39:00Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.readyscript.ru/topic/1818/zadat-title-keywords-description-iz-tpl/</id>
		<entry>
			<title type="html"><![CDATA[Re: Задать TITLE, Keywords, Description из .tpl]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11076/#p11076" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Андрей пишет:</cite><blockquote><p>после своего значение добавляет:<br />&quot;МОЙ ТАЙТЛ :: Название пункта&quot;</p></blockquote></div><p>Как убрать <br /><strong> :: Название пункта</strong><br />из TITLE?</p><br /><br /><p>{$app-&gt;title-&gt;addSection(&#039;ВАШ title&#039;,<strong>0</strong>,&#039;replace&#039;)|devnull}</p>]]></content>
			<author>
				<name><![CDATA[Андрей]]></name>
				<uri>https://forum.readyscript.ru/user/299/</uri>
			</author>
			<updated>2020-04-25T03:39:00Z</updated>
			<id>https://forum.readyscript.ru/post/11076/#p11076</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Задать TITLE, Keywords, Description из .tpl]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/10138/#p10138" />
			<content type="html"><![CDATA[<p>{$app-&gt;meta-&gt;<strong>addKeywords</strong>($metaK,&#039;,&#039;,&#039;before&#039;)|devnull}<br />{$app-&gt;meta-&gt;<strong>addDescriptions</strong>($metaD,&#039;,&#039;,&#039;before&#039;)|devnull}</p><p><strong>не дублирует теги</strong></p><p>{$app-&gt;title-&gt;addSection($metaT,&#039;,&#039;,&#039;before&#039;)|devnull}</p><p><strong>Изменяет TITLE</strong><br />Но после своего значение добавляет:<br />&quot;МОЙ ТАЙТЛ :: Название пункта&quot;</p>]]></content>
			<author>
				<name><![CDATA[Андрей]]></name>
				<uri>https://forum.readyscript.ru/user/299/</uri>
			</author>
			<updated>2019-06-29T18:30:08Z</updated>
			<id>https://forum.readyscript.ru/post/10138/#p10138</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Задать TITLE, Keywords, Description из .tpl]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/10137/#p10137" />
			<content type="html"><![CDATA[<p>...........................<br />{$app-&gt;meta-&gt;cleanMeta(&#039;keywords&#039;])|devnull}</p><p>У Вас опечатка.<br /><strong>ta(&#039;key</strong> ====== надо <strong>ta([&#039;key</strong><br />----------------------------------</p>]]></content>
			<author>
				<name><![CDATA[Андрей]]></name>
				<uri>https://forum.readyscript.ru/user/299/</uri>
			</author>
			<updated>2019-06-29T18:17:44Z</updated>
			<id>https://forum.readyscript.ru/post/10137/#p10137</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Задать TITLE, Keywords, Description из .tpl]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/10114/#p10114" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>1) как удалить первые meta теги, так как при добавлении этой строкой получается два раза теги<br />{$app-&gt;meta-&gt;cleanMeta(&#039;keywords&#039;])|devnull}</p></blockquote></div><p>Правда я не совсем понимаю зачем это делать из шаблона. Практический смысл у Вас какой?</p><p>Если из шаблона, то предварительно делаем так<br /></p><div class="codebox"><pre><code>{$app-&gt;meta-&gt;add([&#039;name&#039; =&gt; &#039;keywords&#039;, &#039;content&#039; =&gt; &#039;здесь текст&#039;])|devnull}</code></pre></div><br /><div class="quotebox"><blockquote><p>2) Как вместо конкретного текста вставить значение переменной или нескольких<br />{$app-&gt;meta-&gt;add([&#039;name&#039; =&gt; &#039;keywords&#039;, &#039;content&#039; =&gt; &#039;$param&#039;])|devnull}<br />Выводит код &lt;meta name=&quot;keywords&quot; content=&quot;$param&quot; &gt;<br />То есть не значение переменной, без кавычек - выводит content=0</p></blockquote></div><p>У нас испорзуется шаблонизатор smarty версии 3+. Соответственно.<br /></p><div class="codebox"><pre><code>{$app-&gt;meta-&gt;add([&#039;name&#039; =&gt; &#039;keywords&#039;, &#039;content&#039; =&gt; $param])|devnull}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Закусило Александр]]></name>
				<uri>https://forum.readyscript.ru/user/20/</uri>
			</author>
			<updated>2019-06-26T08:02:20Z</updated>
			<id>https://forum.readyscript.ru/post/10114/#p10114</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Задать TITLE, Keywords, Description из .tpl]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/10102/#p10102" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Как можно переопределить значения META тегов из шаблона?</p><p>По аналогии с этим<br />{$app-&gt;meta-&gt;add([&#039;name&#039; =&gt; &#039;viewport&#039;, &#039;content&#039; =&gt; &#039;width=device-width, initial-scale=1.0&#039;])|devnull}</p><p>Не получается:<br /><strong>1) как удалить первые meta теги, так как при добавлении этой строкой получается два раза теги</strong><br />{$app-&gt;meta-&gt;add([&#039;name&#039; =&gt; &#039;keywords&#039;, &#039;content&#039; =&gt; &#039;здесь текст&#039;])|devnull}<br /><strong>2) Как вместо конкретного текста вставить значение переменной или нескольких</strong><br />{$app-&gt;meta-&gt;add([&#039;name&#039; =&gt; &#039;keywords&#039;, &#039;content&#039; =&gt; &#039;$param&#039;])|devnull}<br />Выводит код &lt;meta name=&quot;keywords&quot; content=&quot;$param&quot; &gt;<br />То есть не значение переменной, без кавычек - выводит content=0</p>]]></content>
			<author>
				<name><![CDATA[Андрей]]></name>
				<uri>https://forum.readyscript.ru/user/299/</uri>
			</author>
			<updated>2019-06-22T10:14:07Z</updated>
			<id>https://forum.readyscript.ru/post/10102/#p10102</id>
		</entry>
</feed>
