Answers.Body: <p>This will depend on what you're actually trying to do, but if you're building this as part of a plugin, I'd store them as relational tables in the database, and display them as dropdown fields. If you provide more specific information about what you're building, I'll see if I can lend a hand.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T07:27:13.447Z
Answers.Text: Thanks Taylor. It will be a directory of sea ports. So I am planning geocoding, maps and a url structure like 'country/city/portname'. I was also keen on exploring the element API Brandon [https://github.com/pixelandtonic/ElementAPI] to provide json ouput. It might be an ambitious first craft project but I am keen to dig in :)
Answers.UserDisplayName: joomkit
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T13:18:48.140Z
Answers.Text: If it were me, I'd just setup a [Route](http://buildwithcraft.com/docs/routing) that sends that URL to your template, then fetch related content with Craft's native entry functionality. And the ElementAPI is a fantastic (if a little ambitious) way to get into Craft!
Answers.UserDisplayName: Taylor Daughtry
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-29T13:42:32.897Z
Answers.Text: A plugin sounds like overkill for a flexible CMS surely?
Answers.UserDisplayName: joomkit
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-30T15:01:30.870Z
Answers.Text: @joomkit Correct, from what you described in your previous comment I'd suggest simply using Routes, as I mentioned. (Routes are native Craft functionality.) Not sure about any other needs you might have, so YMMV.
Answers.UserDisplayName: Taylor Daughtry
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-23T15:48:31.280Z
Answers.LastActivityDate: 2015-09-23T15:48:31.280Z
Answers.UserDisplayName: Taylor Daughtry
Body: <p>Is there a recommended way for storing countries and cities in craft?
  I can see fields and categories as obvious options but its difficult to see the disadvantages/advantages of either at the beginning of a project.</p>
  
Tags: <categories>
Title: Best practice way to store countries and cities
ThreadText: # Best practice way to store countries and cities
  
  (Asked by: username_0 on 2015-09-23)
  
  Is there a recommended way for storing countries and cities in craft?
  I can see fields and categories as obvious options but its difficult to see the disadvantages/advantages of either at the beginning of a project.
  
  **Tags:** categories
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-09-23. Score: 2
  
  This will depend on what you're actually trying to do, but if you're building this as part of a plugin, I'd store them as relational tables in the database, and display them as dropdown fields. If you provide more specific information about what you're building, I'll see if I can lend a hand.
  
  > **Comments:**
  > **username_0**: Thanks username_1. It will be a directory of sea ports. So I am planning geocoding, maps and a url structure like 'country/city/portname'. I was also keen on exploring the element API Brandon [https://github.com/pixelandtonic/ElementAPI] to provide json ouput. It might be an ambitious first craft project but I am keen to dig in :)  
  > **username_1**: If it were me, I'd just setup a [Route](http://buildwithcraft.com/docs/routing) that sends that URL to your template, then fetch related content with Craft's native entry functionality. And the ElementAPI is a fantastic (if a little ambitious) way to get into Craft!  
  > **username_0**: A plugin sounds like overkill for a flexible CMS surely?  
  > **username_1**: @username_0 Correct, from what you described in your previous comment I'd suggest simply using Routes, as I mentioned. (Routes are native Craft functionality.) Not sure about any other needs you might have, so YMMV.  
  
  ---
  
  