# Händlerkategorie in der sitemap.xml ??

**URL:** https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856
**Category:** Themes & Design
**Created:** [1. Juli 2016 um 16:50 UTC](https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856 "2016-07-01T16:50:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sow](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sow](https://forum.shopware.com/u/sow)
#### Post date: [1. Juli 2016 um 16:50 UTC](https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856/1 "2016-07-01T16:50:51Z")

</div>

Hallo zusammen,

vielleicht kann mir jemand helfen, ich habe leider nichts passendes im Forum gefunden.

Ich habe ein paar Kategorien, die nur für Händler nach dem Login sichtbar sind - leider werden diese Kategorien aber trotzdem in der sitemap.xml mit gelistet.

Hat jemand eine Idee, wie ich die Kategorien in der sitemap ausschließen kann - evtl. über eine Templatedatei (z.B.: frontend/sitemap\_xml/index.tpl) ??

---

<div class="post-metadata">

### Author: ![sow](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sow](https://forum.shopware.com/u/sow)
#### Post date: [5. Juli 2016 um 08:10 UTC](https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856/2 "2016-07-05T08:10:08Z")

</div>

\*\* push und verschoben, hat keiner eine Idee ?? Kann man evtl mit einer Variable und einer “if”-Anweisung die Kategorien im Template aussschließen ??

---

<div class="post-metadata">

### Author: ![Stephan\_Pohl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/stephan_pohl/32/10212_2.png) [@Stephan\_Pohl](https://forum.shopware.com/u/Stephan_Pohl)
#### Post date: [5. Juli 2016 um 09:04 UTC](https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856/3 "2016-07-05T09:04:44Z")

</div>

Hey @sow‍

du kannst der Kategorie ein Freitextfeld mitgeben und im eigenen Theme eine Ableitung der “sitemap\_xml/index.tpl” machen, um dann die entsprechende Prüfung einzubauen.

Viele Grüße,  
Stephan Pohl&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")

---

<div class="post-metadata">

### Author: ![sow](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sow](https://forum.shopware.com/u/sow)
#### Post date: [5. Juli 2016 um 09:32 UTC](https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856/4 "2016-07-05T09:32:29Z")

</div>

Vielen Dank für die Antwort. Das habe ich schon ausprobiert, leider finde ich nicht den richtigen code… Ich habe jetzt {if $sCategoryContent.attribute.attribute5} … und dann komme ich nicht weiter …

---

<div class="post-metadata">

### Author: ![sow](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sow](https://forum.shopware.com/u/sow)
#### Post date: [4. August 2016 um 05:54 UTC](https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856/5 "2016-08-04T05:54:04Z")

</div>

#### PUSH

hat keiner eine Idee ?? Anscheinend kann die Variable " {if $sCategoryContent.attribute.attribute??}" nicht von der …/sitemap\_xml/index.tpl agesprochen werden.

&nbsp;

Ich finde es schon ärgerlich, wenn Händlerseiten in der sitemap.xml auftauchen und Google diese indexiert …

---

<div class="post-metadata">

### Author: ![sow](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sow](https://forum.shopware.com/u/sow)
#### Post date: [6. August 2016 um 08:22 UTC](https://forum.shopware.com/t/handlerkategorie-in-der-sitemap-xml/37856/6 "2016-08-06T08:22:11Z")

</div>

Ich habe es jetzt endlich hinbekommen - über Umwege aber es funktioniert. Wenn jemand Verbesserungsvorschläge hat, sind diese herzlich willkommen.

Hier der Code:

{extends file=“parent:/frontend/sitemap\_xml/index.tpl”}  
&nbsp;&nbsp;&nbsp; {block name=“frontend\_sitemap\_xml\_categories”}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {foreach $sitemap.categories as $category}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {if $category.id == **??** }  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {elseif $category.show}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {include file=“frontend/sitemap\_xml/entry.tpl” urlParams = $category.urlParams lastmod = $category.changed}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {/if}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {/foreach}  
&nbsp;&nbsp;&nbsp; {/block}
