One of the use cases for WCM menu components is the ability to pass parameters to the menu. Normally this is accomplished using query parameters on the URL, or adding to the parameter map of a WCM Rendering Context within a menu.
An example of that approach can be seen here:
In WCM version 8.5, the request attribute plugin has been provided:
This can be used to set a request attribute right from within your design elements, which means you can use logic to build different menu results without manipulating or passing URL parameters.
So, if you have a menu named TestMenu that is looking for a query parameter name menuCategory looking for categories to be passed, you would put this into your presentation code:
[Plugin:RequestAttribute key="menuCategory" mode="set" value="LibraryName/Category"]
The end result is that the menu would be presented, and the menuCategory would be used in the menu to retrieve content with the relevant category.