Hi Scott, after a quick idea from Bonder in an email to me, I thought I might put this up and see what you thought about it.
My proposition is that we add a new section in the web.config which is a list of path=(something) variable=(somethingelse) pairs, which work like this:
When creating a link, we check to see if the path is in this list. If it is, we check to see if the variable is in the querystring. If that is also there, we use the variable as the page name.
So given a page /home/my-blogs, with a blogtitle of red-wine, our resulting link would be /home/my-blogs/red-wine.aspx
When getting an incoming link, we do the opposite. Firstly, check if the full string is in the database as a tabpath. If it isn't, assume it's using this new functionality, and find the tabpath in the web.config, take what is between the last / and the .aspx and reverse it into a querystring variable...
So an incoming url of /home/my-blogs/red-wine.aspx we'd not find /home/my-blogs/red-wine in the tabpaths, but it would be in the web-config with 'blogtitle' as the variable name, so we'd know that the resulting url is 'tabpath'/tabidstuff/default.aspx?blogtitle=red-wine
Some caveats:
1. We could only have one variable per tabpath, so that we didn't have to try to figure out which was supposed to be the one that we're using at a given point...
2. The tabpaths in the web.config section for this would need to be 'leaf' tabs, most likely. If we had tabs below one of these configured ones, we might run into problems...
The advantages are pretty clear for this kind of URL I'm sure everyone can see, but I suppose that modules would have to be written with this sort of functionality in mind, as usually the things they would use on the querystring would be 'blogid', which doesn't really make for an overly nice url really: /home/my-blogs/12.aspx? Shrug.
Any thoughts?
Max |