# Hostianer scroll to top module not working.

**URL:** <https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008>\
**Category:** International (English Only)\
**Tags:** themes--design\
**Created:** [14. Dezember 2015 um 18:14 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008 "2015-12-14T18:14:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![U365](https://avatars.discourse-cdn.com/v4/letter/u/f1d935/32.png) [@U365](https://forum.shopware.com/u/U365)\
**Post date:** [14. Dezember 2015 um 18:14 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/1 "2015-12-14T18:14:34Z")

</div>

Hello community, :shopware: I tried this tutorial [https://blog.hostianer.de/shopware-scro … op-button/](https://blog.hostianer.de/shopware-scroll-to-top-button/) have done all the steps correctly (controlled as well) Created all.less in mytheme/frontend/\_public/src/less Created scroll.less in mytheme/frontend/\_public/src/less/\_modules index.tpl added line in mytheme/frontend/index/ Created scroll.js inmytheme/frontend/\_public/src/js For some reason its not showing the button. ☹ Best regards. :thumbup:

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [14. Dezember 2015 um 18:32 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/2 "2015-12-14T18:32:32Z")

</div>

Did you included the scroll.less in your all.less? Also did you included the js file in your theme.php ? Make also sure to re compile your theme.

---

<div class="post-metadata">

**Author:** ![U365](https://avatars.discourse-cdn.com/v4/letter/u/f1d935/32.png) [@U365](https://forum.shopware.com/u/U365)\
**Post date:** [14. Dezember 2015 um 18:42 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/3 "2015-12-14T18:42:07Z")

</div>

> [@kayyy](#):
>
> Did you included the scroll.less in your all.less? Also did you included the js file in your theme.php ? Make also sure to re compile your theme.

---

<div class="post-metadata">

**Author:** ![Tanny](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@Tanny](https://forum.shopware.com/u/Tanny)\
**Post date:** [14. Dezember 2015 um 18:44 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/4 "2015-12-14T18:44:25Z")

</div>

Das klappt bei mir leider auch nicht. Der Button wird einfach nicht angezeigt. Der soll ja schon vor dem js-file-Einbau zumindest zu sehen sein. Ist er aber leider nicht…

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [14. Dezember 2015 um 19:42 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/5 "2015-12-14T19:42:14Z")

</div>

[quote=“Tanny”]Das klappt bei mir leider auch nicht. Der Button wird einfach nicht angezeigt. Der soll ja schon vor dem js-file-Einbau zumindest zu sehen sein. Ist er aber leider nicht…[/quote] Bei mir hat es ohne Probleme 1zu1 nach dem Tutorial funktioniert. Can you show me your site also @Tanny so i can have a look? Does the “a” appears in the html sourcecode? You may try to extend the block {block name=‘frontend\_index\_after\_body’} instead of {block name=“frontend\_index\_page\_wrap”}

---

<div class="post-metadata">

**Author:** ![useg](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@useg](https://forum.shopware.com/u/useg)\
**Post date:** [14. Dezember 2015 um 20:34 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/6 "2015-12-14T20:34:22Z")

</div>

> [@Tanny](#):
>
> Das klappt bei mir leider auch nicht. Der Button wird einfach nicht angezeigt. Der soll ja schon vor dem js-file-Einbau zumindest zu sehen sein. Ist er aber leider nicht…[/quote] Hallo Tanny, [quote]Der Link sollte ganz unten nach unserem gesamten Content kommen. Wenn wir uns einmal die originale Shopware index.tpl aus dem Bare Theme anschauen, haben wir hier den Block frontend\_index\_page\_wrap[/quote] Bei mir im Shop unter Shopware 5.1.1 gibt es den Block nicht und du musst den „frontend\_index\_body\_inline“ erweitern. `{\* Scroll to top Button \*} {block name='frontend\_index\_body\_inline' append} {/block}` Dann bin ich kein Freund von Bildern und habe deshalb die Shopware-Schrift genommen. Meine modifizierte scroll.less sieht jetzt so aus. `.cd-top { z-index: 999; display: inline-block; position: fixed; .unitize(bottom, 40); .unitize(right, 10); box-shadow: 0 0 1px @body-bg; background: @body-bg; /\* image replacement properties \*/ overflow: hidden; white-space: nowrap; border: 1px solid @brand-primary; .border-radius(); visibility: hidden; opacity: 0; -webkit-transition: opacity .3s 0s, visibility 0s .3s; -moz-transition: opacity .3s 0s, visibility 0s .3s; transition: opacity .3s 0s, visibility 0s .3s; &:after { font-family: 'shopware'; content: "\e610"; color: @brand-primary; font-weight: 700; .unitize(font-size, 20); display:block; .unitize-padding(12, 12 ); } } .cd-top.cd-is-visible, .cd-top.cd-fade-out, .no-touch .cd-top:hover { -webkit-transition: opacity .3s 0s, visibility 0s 0s; -moz-transition: opacity .3s 0s, visibility 0s 0s; transition: opacity .3s 0s, visibility 0s 0s; } .cd-top.cd-is-visible { /\* the button becomes visible \*/ visibility: visible; opacity: 1; } .cd-top.cd-fade-out { /\* if the user keeps scrolling down, the button is out of focus and becomes less visible \*/ opacity: .5; } .cd-top:hover, { background-color: @brand-primary; opacity: 1; &:after { color: @body-bg; } } @media only screen and (min-width: 768px) { .cd-top { .unitize(right, 20); .unitize(bottom, 20); } } @media only screen and (min-width: 1024px) { .cd-top { .unitize(right, 30); .unitize(bottom, 30); } }` Edit: Danke Carsten für die Info habe den „z-index: 999;“ noch hinzugefügt. [quote=„sonic“] „.cd-top“ könnte hier noch einen hohen z-index gebrauchen - ich habe mal 9999 genommen.

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [14. Dezember 2015 um 20:37 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/7 "2015-12-14T20:37:02Z")

</div>

@useg But in shopware 5.1 you should have this block: [https://github.com/shopware/shopware/bl … ex.tpl#L18](https://github.com/shopware/shopware/blob/5.1/themes/Frontend/Bare/frontend/index/index.tpl#L18)

---

<div class="post-metadata">

**Author:** ![useg](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@useg](https://forum.shopware.com/u/useg)\
**Post date:** [14. Dezember 2015 um 20:52 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/8 "2015-12-14T20:52:16Z")

</div>

[quote=„kayyy“]@useg But in shopware 5.1 you should have this block: [https://github.com/shopware/shopware/bl … ex.tpl#L18](https://github.com/shopware/shopware/blob/5.1/themes/Frontend/Bare/frontend/index/index.tpl#L18)[/quote] Hallo Kayyy, sind wir hier nicht im deutschen Forum. 🕶 Bei den Update von Shopware 4 auf 5.1.1 ist der Block definitiv nicht vorhanden. Ich habe jetzt mal das Installationspaket für Shopware 5.1 heruntergeladen und auch da gibt es kein Block „frontend\_index\_page\_wrap“ in der „themes/Frontend/Bare/frontend/index/index.tpl“ Ich denke dieser wird erst mit Shopware 5.1.2 eingefügt.

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [15. Dezember 2015 um 00:24 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/9 "2015-12-15T00:24:18Z")

</div>

@useg Tatsache … da habe ich das wohl vepennt. Steht auch in der [Update.md](https://github.com/shopware/shopware/blob/d5a3deee217be8dd97fef82395414e3626c35f71/UPGRADE.md), dass der Block erst mit 5.1.2 eingeführt wird: [quote]Added new Smarty blocks to the index/index.tpl file frontend\_index\_body\_classes frontend\_index\_page\_wrap frontend\_index\_header\_navigation frontend\_index\_container\_ajax\_cart frontend\_index\_content\_main[/quote]

---

<div class="post-metadata">

**Author:** ![U365](https://avatars.discourse-cdn.com/v4/letter/u/f1d935/32.png) [@U365](https://forum.shopware.com/u/U365)\
**Post date:** [16. Dezember 2015 um 12:06 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/10 "2015-12-16T12:06:29Z")

</div>

I testify that my problem is solved and i thank you for communicating in English. Best regards. :thumbup:

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [18. Dezember 2015 um 22:57 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/11 "2015-12-18T22:57:05Z")

</div>

Zuerst mal Danke für den “Button” 😉 Ich habe die less von Uwe genommen, soweit passt es 🙂 Aber: Z.B. im Listing verschwindet der Button bei “Zuletzt gesehen” hinter den Bildern. “.cd-top” könnte hier noch einen hohen z-index gebrauchen - ich habe mal 9999 genommen.

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [18. Dezember 2015 um 22:58 UTC](https://forum.shopware.com/t/hostianer-scroll-to-top-module-not-working/33008/12 "2015-12-18T22:58:28Z")

</div>

@sonic Danke für den Hinweis. Dann passe ich den Artikel mal an 🙂
