Welcome Guest, Not a member yet? Register   Sign In
Ideas wanted: Different levels/categories, how to translate into URL
#1

[eluser]codex[/eluser]
Basically what I'm looking to build is some sort of encyclopaedia where there's a main category, a subcategory, possibly a sub-subcategory and sub-sub-subcategory. Thing is: I'm not sure how many levels there's going to be and therefore not sure how the url should be structured. For instance:

Main category: animals
Sub category: dogs
Sub sub category: dog breeds

Translates to: domain.com/animals/dogs/breed/terrier

But if terriers can be categorized any further it has effect on your url. So how do you tackle something like this? Ideas/help badly needed!
#2

[eluser]John Pantoja[/eluser]
An idea....or two

One web service I was working on, a co-work suggested it would be awesome if the url could be embedded per say. This web service provided validation, filtering and conversions, say if I wanted to validate an IP, convert it to Aton and the back the url would look like: /AtonToIP/IPToAton/ValidateIP/192.168.1.1

I can't remember how it rolled but basically everything that had a / after it was assumed to be a function so I would populate an array and call the functions in reverse and pass the result to the next.

Another idea is to stop at breed then assume everything else is an option, maybe separate by comma.
#3

[eluser]codex[/eluser]
[quote author="John Pantoja" date="1264051294"]Another idea is to stop at breed then assume everything else is an option, maybe separate by comma.[/quote]

That was my thought too. Thanks for your reply.

Other ideas guys?
#4

[eluser]fRkSsK[/eluser]
any idea? i have same problem




Theme © iAndrew 2016 - Forum software by © MyBB