# Suchfeld in top navigation einbinden

**URL:** https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420
**Category:** Shopware 3.5
**Tags:** templates--design
**Created:** [22. September 2011 um 23:48 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420 "2011-09-22T23:48:33Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Papi\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@Papi\_Sanchez](https://forum.shopware.com/u/Papi_Sanchez)
#### Post date: [22. September 2011 um 23:48 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/1 "2011-09-22T23:48:33Z")

</div>

Hallo, ich verwendet das Standard-Template und finde dieses echt klasse. Aber ich möchte gerne das Suchfeld nicht seperat stehen haben, sondern wie bei dem Template „gradient“ in der Top-Navi auf der rechten Seite. Ich bekomme es leider nicht hin. 😢 Kann mir bitte jemand helfen? Danke sehr.:thumbup:

---

<div class="post-metadata">

### Author: ![Marcel\_Gortz](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@Marcel\_Gortz](https://forum.shopware.com/u/Marcel_Gortz)
#### Post date: [23. September 2011 um 08:30 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/2 "2011-09-23T08:30:37Z")

</div>

Was genau bekommst du nicht hin? Das überhaupt dort einzubinden? Das ist nicht so schwer: Nehme den Code aus der search.tpl: [code]

{block name="frontend\_index\_search\_innerform"}{/block} {\* Ajax loader \*} &nbsp;

[/code] und füge ihn in der categories\_top.tpl unter ein. So sieht die Datei dann aus: [code]

- [{se name=‘IndexLinkHome’}Home{/se}]({url controller=‘index’} “{s name=‘IndexLinkHome’}{/s}”)  
{foreach from=$sMainCategories item=sCategory} {if !$sCategory.hidetop} - [{$sCategory.description}]({if $sCategory.external}{$sCategory.external}{else}{$sCategory.link|rewrite:$sCategory.description}{/if} “{$sCategory.description}”)  
{/if} {/foreach}

 {block name="frontend\_index\_search\_innerform"}{/block} {\* Ajax loader \*} &nbsp;

[/code] Die Positionierung schaffst du dann selbst?

---

<div class="post-metadata">

### Author: ![Papi\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@Papi\_Sanchez](https://forum.shopware.com/u/Papi_Sanchez)
#### Post date: [23. September 2011 um 09:50 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/3 "2011-09-23T09:50:04Z")

</div>

Vielen Dank. Leider erscheint mit Deinem Vorschlag aber nicht die ersehnte Suchleiste in der Top-Navi. Hast Du vielleicht noch eine andere Idee? Danke.

---

<div class="post-metadata">

### Author: ![Marcel\_Gortz](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@Marcel\_Gortz](https://forum.shopware.com/u/Marcel_Gortz)
#### Post date: [23. September 2011 um 10:17 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/4 "2011-09-23T10:17:40Z")

</div>

Also bei mir erscheint das Suchfeld dann in der Top-Navi. Außer wenn die Top-Navi zu voll mit Navigationspunkten ist dann verschiebt sich das bei mir auch so in die 2. Zeile dass ich es nicht mehr sehen kann. Aber wenn genug Platz da ist sollte es eigentlich funktionieren. Zeig doch mal deine categories\_top.tpl

---

<div class="post-metadata">

### Author: ![Papi\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@Papi\_Sanchez](https://forum.shopware.com/u/Papi_Sanchez)
#### Post date: [23. September 2011 um 10:28 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/5 "2011-09-23T10:28:22Z")

</div>

Hallo, Du meinst doch folgende: /shopware/templates/\_default/frontend/index/categories\_top.tpl ? Die habe ich genau nach Deinem Beispiel erstellt. Komischerweise kann ich die categories\_top.tpl sogarm komplett leeren und wieder hochladen, Cache leeren, nichts tut sich?? Immer noch alles zu sehen. Ich verwende das Template: /templates/orange. Das sind doch die Files unter /shopware/templates/\_default/. Oder?

---

<div class="post-metadata">

### Author: ![Papi\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@Papi\_Sanchez](https://forum.shopware.com/u/Papi_Sanchez)
#### Post date: [24. September 2011 um 19:45 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/6 "2011-09-24T19:45:27Z")

</div>

Ok, habe also doch an einer falschen Stelle gewurschtelt. Warum? Hatte das AdvancedMenu aktiviert. Da kann ich lange probieren. Danke für den Hinweis. Jetzt bekomme ich auch Resultate.

---

<div class="post-metadata">

### Author: ![Papi\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@Papi\_Sanchez](https://forum.shopware.com/u/Papi_Sanchez)
#### Post date: [24. September 2011 um 20:16 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/7 "2011-09-24T20:16:22Z")

</div>

Jetzt auch im AdvancedMenu! Super 😃

---

<div class="post-metadata">

### Author: ![andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@andreas](https://forum.shopware.com/u/andreas)
#### Post date: [27. Oktober 2011 um 17:02 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/8 "2011-10-27T17:02:38Z")

</div>

Hallo Papi Sanchez, schreib doch mal, wie du es nun hinbekommen hast, dass es mit der Searchbox und dem Advanced Menu klappt. Bei mir wird es leider nichts. Gruß Andreas

---

<div class="post-metadata">

### Author: ![Papi\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@Papi\_Sanchez](https://forum.shopware.com/u/Papi_Sanchez)
#### Post date: [28. Oktober 2011 um 14:10 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/9 "2011-10-28T14:10:38Z")

</div>

Na klar. Du must halt nur in der …/templates/\_default/frontend/plugins/advanced\_menu/advanced\_menu.tpl die hier beschriebenen Anpassungen durchführen. Meine sieht so aus: [code]{function name=categories\_top level=0}

{foreach from=$categories item=category} - {$category.name} {if $category.sub} {call name=categories\_top categories=$category.sub level=$level+1} {/if}  
{/foreach}{/function}

- [{se name=‚IndexLinkHome‘}{/se}]({url controller=‚index‘} „{s name=‚IndexLinkHome‘}Home{/s}“)  
{foreach from=$sAdvancedMenu item=sCategory} - {$sCategory.description} {if $sCategory.sub} {call name=categories\_top categories=$sCategory.sub} {/if}  
{/foreach}

 {block name="frontend\_index\_search\_innerform"}{/block} {\* Ajax loader \*} &nbsp;

[/code] In der css mußt du noch das Design etwas anpassen, damit es auch gut aussieht. …/templates/\_default/frontend/\_resources/styles/style.css `/\* SEARCH ------------------------ \*/ div#searchcontainer {z-index: 7;text-align: left;height:38px;margin: 1px 0 0 1px;width: 998px;position:static;} div#hidesearch {position:relative;z-index: 2000;} div.inner\_searchcontainer {height: 24px;width: 170px;margin:4px 0 0 806px;position: relative;} div.inner\_searchcontainer .ajax\_loader {background: url("../images/icons/ico\_ajax-loader.gif") no-repeat; position: absolute; top: 4px; left: 130px;z-index: 200;} div.inner\_searchcontainer #submit\_search {padding:0;border: 0 none; height: 24px;float:left;background: url(../images/arrows/bg\_arrow\_search.gif) no-repeat;width: 14px;} div.inner\_searchcontainer p {font-size: 11px;line-height: 12px;float: left;padding:4px;text-transform: uppercase;text-align: right;} input#searchfield {font-size: 10px;padding: 3px 0 0 30px;width: 120px;height: 19px;display:block;float:left;background: url(../images/backgrounds/bg\_search-input.png);margin:0;background-color:#fff;border:1px solid;} #header\_links {position: absolute; top:5px; left: 460px; font-size: 11px;}.related{position:absolute; right:0px; top:0px; height:1.25em} h3 .related{top:5px} div.searchdescription .related{margin-top:3.75em; top:10px} div.searchdescription{height:3.75em; overflow:hidden; z-index:-1; line-height:12px}` Und, alles tuti?

---

<div class="post-metadata">

### Author: ![andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@andreas](https://forum.shopware.com/u/andreas)
#### Post date: [2. Dezember 2011 um 15:03 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/10 "2011-12-02T15:03:54Z")

</div>

Alles Tuti! Vielen Dank. Habe es nicht geschafft, früher zu antworten.

---

<div class="post-metadata">

### Author: ![Papi\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@Papi\_Sanchez](https://forum.shopware.com/u/Papi_Sanchez)
#### Post date: [3. Dezember 2011 um 08:08 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/11 "2011-12-03T08:08:41Z")

</div>

[quote=„andreas“]Alles Tuti! Vielen Dank. Habe es nicht geschafft, früher zu antworten.[/quote] Wow, deine Arbeitszeiten möchte ich haben 😉 Hoffe jetzt funktioniert alles wie gewünscht.

---

<div class="post-metadata">

### Author: ![benda](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@benda](https://forum.shopware.com/u/benda)
#### Post date: [4. Februar 2015 um 21:16 UTC](https://forum.shopware.com/t/suchfeld-in-top-navigation-einbinden/4420/12 "2015-02-04T21:16:04Z")

</div>

Hallo, wenn man die …/templates/\_default/frontend/\_resources/styles/style.css anpasst wird sie doch beim nächsten Update überschrieben oder? Wenn ich eine neue style.css Datei im Ordner …/templates/\_default/frontend/\_resources/styles/ erstelle und diese anpasse muss ich auch die Bilder für das Template mit in den Ordner \_local kopieren, da er sie sonst nicht findet. Das möchte ich aber nicht da es sein kann das bei Updates etwas geändert wird. Gibt es eine Möglichkeit der …/templates/\_default/frontend/\_resources/styles/style.css Datei etwas hinzufügen und diesen Teil dann in \_local speichert?
