Key in .Site.Taxonomies.<tagname> URLized by default?

Hi :slight_smile:

I’m currently trying to get a term list of a taxonomy rendered in the sidebar. For this I created a new taxonomy called “journeys” which will usually contain a normal text string for each post. Something like “London 2013” or “Montreal 2015”.

Now I’ve tried following code in my sidebar.html

{{ range $name, $taxonomy := .Site.Taxonomies.journeys }}
<li><a href="/journeys/{{ $name | urlize }}">{{ $name }} ({{ $taxonomy | len }})</a></li>
{{ end }}

The problem now is that $name seems to already contain the URLized string (e.g. “london-2015”) instead of the verbatim value I set in my doc.

Is this by design or am I doing something wrong? In any case: How could I get to the original value on a site level?

Thanks :slight_smile:

This is by design.

It has been discussed before, see

One of the links there contains a workaround. In your case maybe a simple replace would do.

Thank you :slight_smile: In this case I will probably either go the Data route or create a new content-type/section for the journey and link to instances of that instead.

Try

set the preserveTaxonomyNames site configuration variable to true

works for me.