Skip to content

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

@tfjordside

Description

@tfjordside

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions