Thread:Project:Support desk/Help with template argument, please!

Hi! The template on Wikibooks has an optional argument, taking a sort key which is used when the article the template is used in is sorted in the category Recipes (I will get there in a moment). also calls the template, to which it passes on the optional parameter (if it is provided with it), but now labels it "sortby", since that is the label  expects it to have. then adds the article to the category Recipes (instead of letting do that) and uses the argument labeled "sortby" as the sort key (if it is provided with it). However, somewhere this sort key is lost, and articles that use the template and provide it with a sort key, are not sorted by their sort key but by the article names, such as Döner kebab which provides the template with the sort key "Doner kebab" but nevertheless ends up last in the list of recipes starting at "D" in the category. Can someone please help me to understand why the code isn't working as expected?