I have a Content type called Article, under which I have an article type field, which is a select list/dropdown field. The options of the field is as follows:

8Research in Translation|Research in Translation
1PhotoEssay|Photo Essay

The reason I have numbers in the key is so that I can sort the results in a particular view in the order I want to (This view pulls results from multiple article types and I want them custom sorted).

Now, I have another view whose path is /articles/%, where the view pulls articles from a particular article type based on the contextual filter provided by the URL.

The issue I'm facing is, The contextual filter value is actually the "key" of the article type field.

For example, /articles/2Feature pulls articles having the article type as Feature, but /articles/Feature doesn't work at all.

I don't want to use the key for both the path and the title. Can I use the label rather than the key for both?

Hope the question is clear. Thanks.


  • I haven't got an immediate answer, but I think you should've implemented this using Taxonomy for the Type (which has a weight/order field out of the box), and I think the Views taxonomy contextual filter handler is a bit more advanced, and can handle Name to Machine name conversion etc. – Beebee Apr 9 '14 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.