Hello and i hope that you are having a pleasant day,
i need some wisdom for my taxonomy browser. I am building a nature website and i have implemented my own router framework. I’ve asked about this before and Sir Jim suggested a class file with an animal controller. I have arrived at this juncture with my own method but now i do not know how to proceed because i am not a database esigner and this may even belong in the php coding forums.
i now have a path to an animal page, such as Animalia/Arthropoda/Insecta.
this would be the equivalent of a query string for use in a class file or animal controller. I originally used directories and echo the basename for a breadcrumb title. Now i have the path, so i can explode it, count it and display a dynamic breadcrumb. Thus, i only need one php file to load appropriate content.
what needs to be done to accomplish this task: a breadcrumb title that will contain vernacular names instead of the latin used in the path. A page title using the last path as current file name. Load appropriate content for this current file.
thus, if the path is Animalia/Arthropoda/Insecta, then Insecta will load content for this class. That content will be order names: Hymenoptera, Orthoptera, Hemiptera, Diptera etc.
I need to use these names for multiple purposes: links to the actual content, the breadcrumb title, the page title and language translations.
if i store all of the latin names in a table, then how will i access them based upon what i need them for? in other words, Hymenoptera should only occur once in the database and i may need this name for display but also for translation into vernacular and also as the name of an image or the name of a variable or array. Hymenoptera will be used in a link context under insecta.
understand? i feel like i’m not making sense.
on the insecta page, i need the name of the orders to create links to virtual pages. so Hymenoptera needs to be displayed as a link. The title for this page is Insecta plus vernacular name. The breadcrumb doesn’t have Hymenoptera in it because the path is Animalia/Arthropda/Insecta. I only need Hymenoptera for the link. Yet i need to translate Animalia, Arthropoda and Insecta. I also need to create new variables for use with forms.
so i need a way to tell each page which names it should contain, then access these names in a database without creating a large amount of queries.
if i imagine the following page: Animalia/Arthropoda/Insecta. Then i could set a variable called $group. switch ($group) case ‘Insecta’ then $linkNames equal Hymenoptera, Orthoptera, Hemiptera, Diptera, etc. but $breadcrumb names equal $path (which is Animalia/Arthropda/Insecta). A switch will be too much here, yes?
this is alot of data that should be centralized, yet i don’t know how to centralize and access it based upon specific needs.
i hope that i make sense. I’m sorry for the long post but i’m trying to explain the scenario as best as i can. I think that this may be a database design issue mixed with php for accessing the appropriate material.