Question

We want to store list of countries and thier counties/states for our latest Umbraco project. These country and county ids are required in other modules for filtering and searching.

We are not using any custom database tables or custom sections all modules.

One option we found is to store country and it's counties as Umbraco Content Library nodes, but not sure about the performance impact.

Is there any other suitable way to overcome this situation?

Was it helpful?

Solution

Umbraco content library nodes are perfect for this:

  • The number of countries is limited, therefore no risk of having thousands of entries all of a sudden
  • The data is probably not updated frequently.
  • This will be published to umbraco.config which is accessible via xslt and cached in memory - performance impact: very fast!
  • States can be stored as child nodes of each country
  • Other content nodes can be linked with built-in content pickers to countries/states (and filter/search etc).
  • Integrated Umbraco functionality (publishing, node order, etc.) can be used since they are just nodes
  • No need for a developer to add a state/country (though you probably want to import the first batch...)

You may consider grouping countries in regions (or similar) because approx. 250 nodes is still a lot of nodes to look through in the content library.

OTHER TIPS

There is another way to store these data - static file, such as Xml.

But this way has some limit:

1) you can not manage these data in Umbraco

2) You have to write your own code to read these data.

I'd go with the Content Library option. But you may also find something useful here: http://ucomponents.codeplex.com/documentation

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top