country selected

Author Message

Martin Ulrich

Friday 07 July 2006 10:12:49 am

in userregister.tpl there is a field country. How can I preselect a country,
like: <option selected value="Germany">.

There is a list of country in content.ini, but I don't know where and how I have to put the "selected" value in.

select thanks )

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Łukasz Serwatka

Sunday 09 July 2006 11:54:45 pm

Hi,

Override standard template design/standard/templates/shop/userregister.tpl (just copy it to your design)

Then edit your override template replace code:

{include uri='design:shop/country/edit.tpl' select_name='Country' select_size=5 current_val=$country}

with:

{include uri='design:shop/country/edit.tpl' select_name='Country' select_size=5 current_val=$country default_val='Germany' default_desc='Germany'}

You can define default country using parameters:

default_val='Germany' 
default_desc='Germany'

Please test and let us know if this work ;)

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

Martin Ulrich

Monday 10 July 2006 2:42:02 am

bad news

it doesnt work ;-(

sorry ;-/

S.

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Łukasz Serwatka

Monday 10 July 2006 2:43:12 am

Did you clear all the cache, after you did template changes? Any errors?

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

Martin Ulrich

Monday 10 July 2006 3:08:25 am

yes clear all cache.

But I mean the userregister.tpl when user is NOt login.

If user is login it works with predefined value. The last edit/changed values occurs

(It would be nice if a otherwise registered user login first time all of his personal values would be there as predefined. But only name and email the first time is there -?)

I have to spend mor time with it. ... :-)
think it over

Thanks!

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Łukasz Serwatka

Monday 10 July 2006 4:01:53 am

Do you use ezcountry datatype? Then you will need override edit template design/standard/templates/content/datatype/edit/ezcountry.tpl and add default value there.

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

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 22:28:07
Script start
Timing: Jan 18 2025 22:28:07
Module start 'layout'
Timing: Jan 18 2025 22:28:07
Module start 'content'
Timing: Jan 18 2025 22:28:09
Module end 'content'
Timing: Jan 18 2025 22:28:09
Script end

Main resources:

Total runtime1.3438 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.9141152.6250
Module start 'layout' 0.00670.0036 740.539139.4453
Module start 'content' 0.01031.3320 779.9844571.3672
Module end 'content' 1.34230.0015 1,351.351616.1719
Script end 1.3437  1,367.5234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2435160.0002
Check MTime0.00140.1011160.0001
Mysql Total
Database connection0.00070.053310.0007
Mysqli_queries1.276294.9671660.0193
Looping result0.00060.0443640.0000
Template Total1.312397.720.6562
Template load0.00930.694420.0047
Template processing1.303096.964620.6515
Template load and register function0.00020.012610.0002
states
state_id_array0.00100.073210.0010
state_identifier_array0.00140.107420.0007
Override
Cache load0.00890.6598370.0002
Sytem overhead
Fetch class attribute can translate value0.00040.032220.0002
Fetch class attribute name0.00110.078570.0002
XML
Image XML parsing0.00080.061320.0004
class_abstraction
Instantiating content class attribute0.00000.001590.0000
General
dbfile0.00080.0614180.0000
String conversion0.00000.000840.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs