Storing cities of a country in a dropdown box

Author Message

Robert Ledoux

Monday 04 August 2008 10:00:32 am

Hi everybody

I try to make a website with ez publish. I need to create a custom class for store and display my products. However, I need to know for all product where it is (geolocalisation)

I think to store that in my custom class "Products" this information but how ?

Can I make a dropdown box with all city of my country ? How do that ?
Can I separate state/city width 2 linked dropdown box?

Thanks a lot for your responses.

Chap

Łukasz Serwatka

Tuesday 05 August 2008 12:28:01 am

I don't know how many cities in your country is but I assume a thousands thus I don't see point in keeping all country cities in one dropdown box. Just use text string and let users to fill that filed. For states you can create new class and use object relation list which support dropdown list style.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Robert Ledoux

Wednesday 06 August 2008 4:31:08 am

Thanks for your answer Łukasz Serwatka.

Howerver, I founded this contrib "Datatype: eZCountry". Do you think I can make two other datatype named Region and city? I have read an article about creating datatype in an extension.

But now my problem is :
If a user selects "France" in the first attribute "ezCountry" on my object, can I propose to the second select box all the city in France. You now what I mean?

Thanks

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:12:41
Script start
Timing: Jan 18 2025 16:12:41
Module start 'layout'
Timing: Jan 18 2025 16:12:41
Module start 'content'
Timing: Jan 18 2025 16:12:41
Module end 'content'
Timing: Jan 18 2025 16:12:41
Script end

Main resources:

Total runtime0.7884 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.1563152.6406
Module start 'layout' 0.00580.0027 741.796939.4766
Module start 'content' 0.00850.7784 781.2734535.8984
Module end 'content' 0.78690.0015 1,317.171912.1250
Script end 0.7884  1,329.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4328160.0002
Check MTime0.00130.1694160.0001
Mysql Total
Database connection0.00100.130610.0010
Mysqli_queries0.739193.7452570.0130
Looping result0.00060.0745550.0000
Template Total0.755695.820.3778
Template load0.00210.264820.0010
Template processing0.753595.564920.3767
Template load and register function0.00020.028910.0002
states
state_id_array0.00090.117110.0009
state_identifier_array0.00140.183120.0007
Override
Cache load0.00170.2144190.0001
Sytem overhead
Fetch class attribute can translate value0.00130.162520.0006
Fetch class attribute name0.00090.120340.0002
XML
Image XML parsing0.00070.089820.0004
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00080.0996180.0000
String conversion0.00010.016040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs