M
M
Mikhail Smirnov2021-12-24 18:47:52
Vue.js
Mikhail Smirnov, 2021-12-24 18:47:52

How to make CNC on nuxt.js like in Bitrix?

There is a site on Bitrix, we decided to remake the frontend on nuxt.js, Bitrix will act as api

In Bitrix, links like this:
Category: /catalog/tovary-dlya-rybalki/zimnyaya-rybalka/ledobury/
Product page: /catalog/product- dlya-rybalki/zimnyaya-rybalka/ledobury/futlyar_universalnyy_dlya_nozhey_d_150/

looked at the routing documentation
catalog/
--| _category/
-----| index.vue

tried to pass to _category tovary-dlya-rybalki/zimnyaya-rybalka/ledobury but gives 404 error

How can I make such links to nuxt.js? otherwise, when changing the url of the pages, the entire indexing of the site will fall off and it will drop out of the search

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2021-12-24
@fortoster82

Try using _.vue instead of _category.vue.
Then in $route.params.pathMatch you will have the whole path after /catalog/, take it apart and do what you want with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question