All threads / How do I merge query parameters into URL like Nomad List?

Ask A Question


You’re not receiving notifications from this thread.

How do I merge query parameters into URL like Nomad List?

Taylor Cooney asked in General

Nomad List is a crowdsourced database of cities for Digital Nomads. They do this really cool thing for SEO where as you apply filters, the database is queried and the home page dynamically updates to display the best matching city. Crucially, the results of each filter query are also unique URLs.

Here is a photo of an example,

For example, if I want to filter place in europe, it appends this, places-in-the-european-union, instead of ?place=european-union

The HTML markup of their link is interesting. Does anyone have an idea of how to do this?

<div class="filter half choices c1">
            <div class="choice active" data-filter-slug="near-a-beach" data-filter-slug-position="after" data-filter-target="tags" data-filter-type="partial-match" data-filter-value=",beach">
                            <span>⛱ Near beach</span>
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 48,387+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.