C
C
Christina2017-09-24 23:12:54
CMS
Christina, 2017-09-24 23:12:54

Where to write links to the slider in Magento 2?

Hello!
Please tell me, I need to add swiper-slider to the main page.
Where to register links to its css and js?
Where can I find the code for the main page?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
imdeveloper, 2017-09-25
@KrisIris

It is best described here https://magento.stackexchange.com/questions/131056... + there is a link to the official documentation
PS Do not forget to clear the cache after changes

E
Exploding, 2017-09-25
@Exploding

There is something unknown with the templates ... but they allegedly write at the full moon, you need to do this:
to the page.xml file to the section
you need to add the following ritual chants:

<block type="core/text" name="userapi">
<action method="addJs"><script>path/to/my/file.js</script></action>
</block>

And after that, supposedly all the problems and hardships with the new script should go away!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question