Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to catagorize (sub) web pages

How to catagorize (sub) web pages
Thread Tools
el chupacabra
Mac Elite
Join Date: Apr 2001
Status: Offline
Reply With Quote
Jan 18, 2011, 08:10 PM
 
I see no one hardly comes here, so probably wont get a response... which is why some of these topics really should be consolidated.

Anyway for a hobby Im thinking of making a site where you select a state or country and it then lists the species that live in that state(lists the sub sites for each species). the problem is many animals live in multiple states which means Id have to make a separate web page for each state and link to the species page for each state. thats too tedious. can I just name a species page something like cat_florida_georgia.html and then when I click on the link of florida it would read which files contain florida and display them as a sort of search result?

what steps would i have to go to to set this up?
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Jan 18, 2011, 08:32 PM
 
Instead, you could make a separate page for each species and link to them from wherever applicable. If you don't want to make the species pages full pages, then you could make them minimal and include them in your main pages using iframes.

If you plan to expand this to a large number of species (and/or state locations) then it would make more sense to use a database backend, and generate your page on the fly with PHP.
     
andi*pandi
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status: Offline
Reply With Quote
Jan 18, 2011, 09:15 PM
 
Agreed a database sounds like a good solution.

What you describe also sounds like something I learned about apache, where the format of your url calls different templates etc. So stateanimals.com/bystate/ma would result in a list of animals in MA, and clicking on one would bring you to stateanimals.com/byanimal/squirrel.html or something. It's been a while and it's gone fuzzy.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 18, 2011, 11:04 PM
 
A database sounds like a no-brainer for you.

I would suggest first learning how to enter your data into the database either via the MySQL command line or using a tool such as phpMyAdmin, and then learn to query the database using PHP or Ruby on Rails and output this to a webpage.

Then, you can learn about passing query strings or analyzing URL segments as andi*pandi is describing to create URLs that are associated with certain queries.
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Jan 19, 2011, 12:19 AM
 
Why database, this could be easily done in iWeb.

If you have a million years time.

-t
     
andi*pandi
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status: Offline
Reply With Quote
Jan 19, 2011, 11:36 AM
 
Memory still fuzzy, but I think if you have your data in xml, you don't need a database, and the query strings can use xpath and xslt to assemble the pages on the fly... but you do need apache/cocoon to do that. I guess it depends which you want to learn, and what you have on your server.
     
el chupacabra  (op)
Mac Elite
Join Date: Apr 2001
Status: Offline
Reply With Quote
Jan 20, 2011, 12:13 PM
 
hm so I take it there isnt a css or html 5 solution to this. Is php or xml easy to learn? if i had to hire it out could I get it done for 300 or less? I was originally thinking linking to the pages where ever applicable but that just seems so crude... that is my backup plan though.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 20, 2011, 01:16 PM
 
Originally Posted by el chupacabra View Post
hm so I take it there isnt a css or html 5 solution to this. Is php or xml easy to learn? if i had to hire it out could I get it done for 300 or less? I was originally thinking linking to the pages where ever applicable but that just seems so crude... that is my backup plan though.

It's hard to assess whether learning PHP or XML would be easy, it depends on your experience and comfort level with programming. I would go with PHP + database for performance and other reasons, personally...

If you want to contact me via PM I'm happy to work out defining the task for hiring this out to me, or at least help you hire it out to somebody else.

There is HTML5 storage, but I don't think this part of the spec has been widely supported, and non of the spec has been officially approved. Whatever support it has would be limited to certain browsers.
     
andi*pandi
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status: Offline
Reply With Quote
Jan 20, 2011, 05:14 PM
 
I found PHP to be simple, but that's AFTER tackling XSLT/xpath, so I think I made my own reverse learning curve. The concepts were hardest to learn.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:09 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,