Template:UI/publications library/facet chip

From Miniscope
Jump to: navigation, search

Facet-chip partial for Template:UI/publications_library. Receives the facet value as {{{1}}} and the property name as {{{userparam}}} (carried through from the #ask |userparam= argument).

Renders the value as a clickable chip that links to Special:SearchByProperty for that property/value pair — the no-JavaScript way to surface "all publications with this type/topic/ year" without depending on SemanticDrilldown.

The double urlencode on the property name handles the "+" → "%2B" encoding that SearchByProperty needs (spaces in property names are encoded as "+" in the userparam, then urlencoded to "%2B" in the final URL).