building a menu from meta data
Posted: Tue Apr 29, 2008 1:22 pm
Hi everyone.
I've just signed up to these forums and would like to say 'Hi!' first and foremost! I hope I will be able to contribute here in the time to come.
Back to what brings me here initially - I am trying to create dynamic menus for my website: http://www.prawnstarproductions.com. I have a lot of projects that fall under more than one 'traditional' heading. For example, I have a racing game that falls under the category of 'game' and 'university'. Another example is a CD cover I've done that falls under 'Design' and 'Music'. Both of these headings would have links to these project in the dynamic menu. The inflexible infrastructure I currently have for categorising these projects does not cater for this multi-modality, and I want to implement something more suitable.
So I wanted to use meta tags to tag each page with some keywords: 'Uni', 'Design', 'yr_2007', 'SoloProject', etc. The idea is that I then make a hard coded menu with these keywords available on my website. By clicking on one, a list of links to relevant projects is dynamically created.
I would like for the list to be generated like this:
1. The visitor clicks on a keyword in the menu
2. That keyword is passed to a php script which then:
a) identifies all files called 'index.php' in current directory AND deep scanning folders beneath it.
b) then QUICKLY parses the meta tags of all index.php files - adding that page's link to an array if the keyword is found
3. populates a menu with a link to that project.
What do you guys reckon - is this possible / likely to work? My inexperience with PHP makes this a real dilemma and I don't know whether I need to start from scratch or if there's a solution already available that I could use. Certainly - a few relevant code snippets would be a great start.
Thanks for your help as I begin to test the waters for this undertaking.
I've just signed up to these forums and would like to say 'Hi!' first and foremost! I hope I will be able to contribute here in the time to come.
Back to what brings me here initially - I am trying to create dynamic menus for my website: http://www.prawnstarproductions.com. I have a lot of projects that fall under more than one 'traditional' heading. For example, I have a racing game that falls under the category of 'game' and 'university'. Another example is a CD cover I've done that falls under 'Design' and 'Music'. Both of these headings would have links to these project in the dynamic menu. The inflexible infrastructure I currently have for categorising these projects does not cater for this multi-modality, and I want to implement something more suitable.
So I wanted to use meta tags to tag each page with some keywords: 'Uni', 'Design', 'yr_2007', 'SoloProject', etc. The idea is that I then make a hard coded menu with these keywords available on my website. By clicking on one, a list of links to relevant projects is dynamically created.
I would like for the list to be generated like this:
1. The visitor clicks on a keyword in the menu
2. That keyword is passed to a php script which then:
a) identifies all files called 'index.php' in current directory AND deep scanning folders beneath it.
b) then QUICKLY parses the meta tags of all index.php files - adding that page's link to an array if the keyword is found
3. populates a menu with a link to that project.
What do you guys reckon - is this possible / likely to work? My inexperience with PHP makes this a real dilemma and I don't know whether I need to start from scratch or if there's a solution already available that I could use. Certainly - a few relevant code snippets would be a great start.
Thanks for your help as I begin to test the waters for this undertaking.