<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум ReadyScript &mdash; Кастомная карта сайта]]></title>
	<link rel="self" href="https://forum.readyscript.ru/feed/atom/topic/2260/" />
	<updated>2022-11-09T17:10:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.readyscript.ru/topic/2260/kastomnaya-karta-saita/</id>
		<entry>
			<title type="html"><![CDATA[Re: Кастомная карта сайта]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11847/#p11847" />
			<content type="html"><![CDATA[<p>Вам нужен вот этот хук <a href="https://readyscript.ru/dev-manual/dev_hooks.html#dev_hooks_getpages">https://readyscript.ru/dev-manual/dev_h … s_getpages</a> там можно отфитровать список из входящиго параметра getpages</p>]]></content>
			<author>
				<name><![CDATA[Закусило Александр]]></name>
				<uri>https://forum.readyscript.ru/user/20/</uri>
			</author>
			<updated>2022-11-09T17:10:16Z</updated>
			<id>https://forum.readyscript.ru/post/11847/#p11847</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Кастомная карта сайта]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11843/#p11843" />
			<content type="html"><![CDATA[<p>/**<br />&nbsp; &nbsp; &nbsp;* Отдает составные части sitemap<br />&nbsp; &nbsp; &nbsp;*<br />&nbsp; &nbsp; &nbsp;* @return void<br />&nbsp; &nbsp; &nbsp;*/<br />&nbsp; &nbsp; function sitemapChunkToOutput($chunk)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $app = \RS\Application\Application::getInstance();<br />&nbsp; &nbsp; &nbsp; &nbsp; $chunk_file = $this-&gt;getChunkFilepath($chunk);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (file_exists($chunk_file)) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $content_type = $this-&gt;gzip ? &#039;application/x-gzip&#039; : &#039;text/xml&#039;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $app-&gt;headers<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;addHeader(&#039;Content-Type&#039;, $content_type)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;sendHeaders();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; readfile($chunk_file);<br />&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $app-&gt;showException(404, t(&#039;Файл не найден&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p>]]></content>
			<author>
				<name><![CDATA[Дмитрий]]></name>
				<uri>https://forum.readyscript.ru/user/645/</uri>
			</author>
			<updated>2022-11-01T13:50:23Z</updated>
			<id>https://forum.readyscript.ru/post/11843/#p11843</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Кастомная карта сайта]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11842/#p11842" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Закусило Александр пишет:</cite><blockquote><p>Так, а в Апи, что там в методе sitemapChunkToOutput?</p></blockquote></div><p>К сожалению мозгов не хватает понять, что нужно?)))</p>]]></content>
			<author>
				<name><![CDATA[Дмитрий]]></name>
				<uri>https://forum.readyscript.ru/user/645/</uri>
			</author>
			<updated>2022-11-01T13:46:49Z</updated>
			<id>https://forum.readyscript.ru/post/11842/#p11842</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Кастомная карта сайта]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11841/#p11841" />
			<content type="html"><![CDATA[<p>Так, а в Апи, что там в методе sitemapChunkToOutput?</p>]]></content>
			<author>
				<name><![CDATA[Закусило Александр]]></name>
				<uri>https://forum.readyscript.ru/user/20/</uri>
			</author>
			<updated>2022-11-01T12:48:44Z</updated>
			<id>https://forum.readyscript.ru/post/11841/#p11841</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Кастомная карта сайта]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11840/#p11840" />
			<content type="html"><![CDATA[<p>namespace Sitemap\Controller\Front;</p><p>class Sitemap extends \RS\Controller\Front<br />{<br />&nbsp; &nbsp; public<br />&nbsp; &nbsp; &nbsp; &nbsp; $site_id,<br />&nbsp; &nbsp; &nbsp; &nbsp; $map_type,<br />&nbsp; &nbsp; &nbsp; &nbsp; $gzip,<br />&nbsp; &nbsp; &nbsp; &nbsp; $chunk;</p><p>&nbsp; &nbsp; function init()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;site_id = $this-&gt;url-&gt;request(&#039;site_id&#039;, TYPE_INTEGER);<br />&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;map_type = $this-&gt;url-&gt;request(&#039;type&#039;, TYPE_STRING);<br />&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;gzip = $this-&gt;url-&gt;request(&#039;pack&#039;, TYPE_STRING) == &#039;gz&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;chunk = $this-&gt;url-&gt;request(&#039;chunk&#039;, TYPE_STRING);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;wrapOutput(false);<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; /**<br />&nbsp; &nbsp; &nbsp;* Генерирует и возвращает главный файл sitemap.xml<br />&nbsp; &nbsp; &nbsp;*/<br />&nbsp; &nbsp; function actionIndex()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $api = new \Sitemap\Model\Api($this-&gt;site_id, $this-&gt;map_type, $this-&gt;gzip);<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($this-&gt;chunk != &#039;&#039;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $api-&gt;sitemapChunkToOutput((int)$this-&gt;chunk);<br />&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $api-&gt;sitemapToOutput();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; }<br />}</p>]]></content>
			<author>
				<name><![CDATA[Дмитрий]]></name>
				<uri>https://forum.readyscript.ru/user/645/</uri>
			</author>
			<updated>2022-10-26T06:20:30Z</updated>
			<id>https://forum.readyscript.ru/post/11840/#p11840</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Кастомная карта сайта]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11839/#p11839" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Дмитрий пишет:</cite><blockquote><p>Здравствуйте. Подскажите, можно мне как-то подпилить модуль sitemap, чтобы убрать автоматическое добавление категорий и товаров в него? Или в orm editore галочку сделать товарам и категориям (добавлять или нет)</p></blockquote></div><p>Покажите код front контроллера</p>]]></content>
			<author>
				<name><![CDATA[Закусило Александр]]></name>
				<uri>https://forum.readyscript.ru/user/20/</uri>
			</author>
			<updated>2022-10-23T15:22:02Z</updated>
			<id>https://forum.readyscript.ru/post/11839/#p11839</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Кастомная карта сайта]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/11838/#p11838" />
			<content type="html"><![CDATA[<p>Здравствуйте. Подскажите, можно мне как-то подпилить модуль sitemap, чтобы убрать автоматическое добавление категорий и товаров в него? Или в orm editore галочку сделать товарам и категориям (добавлять или нет)</p>]]></content>
			<author>
				<name><![CDATA[Дмитрий]]></name>
				<uri>https://forum.readyscript.ru/user/645/</uri>
			</author>
			<updated>2022-10-18T05:52:27Z</updated>
			<id>https://forum.readyscript.ru/post/11838/#p11838</id>
		</entry>
</feed>
