I am actually working on something similar in concept to that, passing in variables through parameters. The basic idea is that in the core/<module>/Block you have the files that control what data your frontend theme template files have and then set relevant data that way. That would be how to do it but I am still having trouble with it. There is a function:
Whatever is the parameter passed to the getParam function is what is in your url, i.e.
This means that whatever variable you assign the parameter to will get the value after the ‘id’ url section (1). I am trying to figure out in the controllers section what to do with anything not /catalog/, i.e. with the paramaters appended and directing it to the right place.
EDIT: I should have said that you would do that in the Blocks directory not in the template directories.