Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transform of url from id's to custom object. #13

Open
tfjordside opened this issue May 28, 2024 · 0 comments
Open

transform of url from id's to custom object. #13

tfjordside opened this issue May 28, 2024 · 0 comments
Assignees

Comments

@tfjordside
Copy link
Member

Problem: we would like to have nicer url's in searches so they don't get like this: https://dev-10072li-fe.testserver.nu/da/nyheder/?categories=35847cb4-6a09-45d3-841d-733d9ad2cfc6

We want to create a mapping handling so we can send an obejct to the useLimboSearch where we can set that

{
   categories: {
       vejle: '35847cb4-6a09-45d3-841d-733d9ad2cfc6'
   }
}

So a search that returns /search?categories=35847cb4-6a09-45d3-841d-733d9ad2cfc6 can return a search /search?categories=vejle

We need to be able to make a custom config for search urls.

Search config already have a urlMapping prop. https://github.com/limbo-works/Limbo.Nuxt.Search/blob/main/composables/useLimboSearch.js#L73

first attempts at implementing is here: https://github.com/limbo-works/Limbo.Nuxt.Search/blob/main/composables/useLimboSearch.js#L624 - it is not working but I think it is the right place to put it.

Currently solution is only needed in the useLimboSearch composable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants