For this, you will need to override and implement the "CreateBrowseRequest" yourself and then split the query string key accordingly. This is something that could probably be improved to make it easier to extend this.
Thanks for getting back so quick! I did some testing and got it working, I got it working, and created a new method besides yours, to handle it. Everything works out of the box with Bobo so the only thing we have to do is push the extra parameters with.
So an example would be that for url like this :
?fHand=Right&fSex=Male&f_Sex=Female
It works :) It might not be the prettiest way of extending it, but it works. Do you think it could become a nugetpackage upgrade? since im using your nuget package in my project.
Hey Rasmus, sorry for the delay in getting back to you, been super busy the last few days. Thank you very much for the pull request, however I feel it could be more generic as it duplicates a lot of the code atm. Hopefully I’ll get a chance to have a proper look this weekend. Cheers
Right after submitting the pullrequest i saw that aswell, but what I thought was, why not just embed it into the normal request method, why whould we want it not to be able to handle multi query params. Just a thought.
Also interested in this, I did an implementation where the values are passed with a delimiter but unsure about what the best way is (since there doesn't seem to be a standard)
This should be a non-breaking change and then also allow you to swap out how the query string is parsed using the composition over inheritance approach to make it easier.
I've added two basic implementations, the default one is what Rasmus provided and then also a delimiter one to handle the scenario Tim mentioned.
You can then simply swap the default one out by passing it to the BaseBrowser constructor:
public MyBrowser() : base(new DelimiterQueryStringParser())
{
}
Let me know your thoughts, happy to change it if you have any others ideas.
Just an update, I downloaded your branch and tried building it, it couldnt, its just because the new folder /DesignAgency.BoboFacets/FacetQueryStringParsers/ is not part of the project.
But it works super fine, so ill say release the kraken :)
multi select under facet
Hey :)
Im trying out your package, and ive downloaded your example, there is just one thing that I cannot get to work!
Multi select, if my query becomes something like this: ?fcategory=animals&fcategory=clothing
Only the first category is looked upon, what im i doing wrong? Isnt this the whole idea with facets?
Hope you can point me to my error, or in the direction fo fixing this :)
Hi Rasmus,
For this, you will need to override and implement the "CreateBrowseRequest" yourself and then split the query string key accordingly. This is something that could probably be improved to make it easier to extend this.
https://github.com/designagencyuk/DesignAgency.BoboFacets/blob/master/development/DesignAgency.BoboFacets/Services/BaseBrowser.cs#L225
Cheers, Tom
Hey Tom!
Thanks for getting back so quick! I did some testing and got it working, I got it working, and created a new method besides yours, to handle it. Everything works out of the box with Bobo so the only thing we have to do is push the extra parameters with.
So an example would be that for url like this : ?fHand=Right&fSex=Male&f_Sex=Female
https://github.com/designagencyuk/DesignAgency.BoboFacets/pull/4
It works :) It might not be the prettiest way of extending it, but it works. Do you think it could become a nugetpackage upgrade? since im using your nuget package in my project.
Hey Tom any update on the pull request? Because I would really like to update my nuget package with the method for our project?
Hey Rasmus, sorry for the delay in getting back to you, been super busy the last few days. Thank you very much for the pull request, however I feel it could be more generic as it duplicates a lot of the code atm. Hopefully I’ll get a chance to have a proper look this weekend. Cheers
Thanks for getting back.
Right after submitting the pullrequest i saw that aswell, but what I thought was, why not just embed it into the normal request method, why whould we want it not to be able to handle multi query params. Just a thought.
Comment author was deleted
Also interested in this, I did an implementation where the values are passed with a delimiter but unsure about what the best way is (since there doesn't seem to be a standard)
https://stackoverflow.com/questions/24059773/correct-way-to-pass-multiple-values-for-same-parameter-name-in-get-request
Hey... Sorry, it's taken me a while to look at this, been quite busy recently.
I've come up with the following solution if you could both have a look and let me know what you think:
https://github.com/designagencyuk/DesignAgency.BoboFacets/commit/71dfc555ed382f79c64a60ac0d3dcfb38ae86143
This should be a non-breaking change and then also allow you to swap out how the query string is parsed using the composition over inheritance approach to make it easier.
I've added two basic implementations, the default one is what Rasmus provided and then also a delimiter one to handle the scenario Tim mentioned.
You can then simply swap the default one out by passing it to the BaseBrowser constructor:
Let me know your thoughts, happy to change it if you have any others ideas.
Cheers, Tom
Comment author was deleted
Looks ace, I'll give it a go shortly! Thanks again for a great project!
This is great!
Tom could you update the nuget package? Then ill test it asap!
Just an update, I downloaded your branch and tried building it, it couldnt, its just because the new folder /DesignAgency.BoboFacets/FacetQueryStringParsers/ is not part of the project.
But it works super fine, so ill say release the kraken :)
Cheers Rasmus, that's now fixed and pushed to both Nuget & Our as version 0.1.1.
AWESOME!
Thanks man!
is working on a reply...