This repository has been archived by the owner on Feb 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #603 from marcom-unimelb/fix-filtered-listing-para…
…m-encoding Filtered Listing: fix styles + fix case of pre-select parameters
- Loading branch information
Showing
4 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
assets/targets/components/filtered-listings/01-pre-select-filters.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<h2 id="pre-select-filters">Pre-select filters</h2> | ||
|
||
The <strong>tags</strong> filter can be pre-selected on page load by adding <code>?tags=<tag-list></code> to the end of the URL, where <code><tag-list></code> is a coma-separated list of tags. For instance: <code><a href="?tags=nominavi,ludico">?tags=nominavi,ludico</a></code>. | ||
The <strong>tags</strong> filter can be pre-selected on page load by adding <code>?tags=<tag-list></code> to the end of the URL, where <code><tag-list></code> is a coma-separated list of tags — e.g. <code><a href="?tags=nominavi,ludico">?tags=nominavi,ludico</a></code>. | ||
|
||
Similarly, the <strong>section</strong> filter can be pre-selected with <code>?section=<section-name></code>. For instance: <code><a href="?section=section-3">?section=section-3</a></code>. | ||
The <strong>section</strong> filter can be pre-selected with <code>?section=<section-name></code> — e.g. <code><a href="?section=section-3">?section=section-3</a></code>. | ||
|
||
You may combine both the <code>tags</code> and <code>section</code> parameters in the querystring: <code><a href="?tags=nominavi§ion=section-3">?tags=nominavi§ion=section-3</a></code>. If the name of a tag or section contains a <a href="https://en.wikipedia.org/wiki/Percent-encoding#Types_of_URI_characters">reserved character</a>, it must be encoded (e.g. <code>&</code> must be replace with <code>%26</code>). | ||
You may of course use both parameters together: <code><a href="?tags=nominavi§ion=section-3">?tags=nominavi§ion=section-3</a></code>. | ||
|
||
<p class="alert-warning">Don't forget to encode any <a href="https://en.wikipedia.org/wiki/Percent-encoding#Types_of_URI_characters">reserved URI character</a> (e.g. replace <code>&</code> with <code>%26</code>) — or better, <a href="https://en.wikipedia.org/wiki/Semantic_URL#Slug">slugify the name of your sections and tags</a>.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters