Forums / Install & configuration / country selected

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

eZ debug

Timing: Jan 18 2025 19:10:18
Script start
Timing: Jan 18 2025 19:10:18
Module start 'content'
Timing: Jan 18 2025 19:10:18
Module end 'content'
Timing: Jan 18 2025 19:10:18
Script end

Main resources:

Total runtime0.7875 sec
Peak memory usage4,096.0000 KB
Database Queries203

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 588.8281180.8359
Module start 'content' 0.00860.6274 769.6641576.4453
Module end 'content' 0.63600.1515 1,346.1094337.3750
Script end 0.7875  1,683.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5228210.0002
Check MTime0.00160.2019210.0001
Mysql Total
Database connection0.00230.290510.0023
Mysqli_queries0.701689.09242030.0035
Looping result0.00230.29352010.0000
Template Total0.752195.520.3761
Template load0.00180.224920.0009
Template processing0.750395.275320.3752
Template load and register function0.00020.025610.0002
states
state_id_array0.00190.238610.0019
state_identifier_array0.00150.187520.0007
Override
Cache load0.00150.1945370.0000
Sytem overhead
Fetch class attribute can translate value0.00130.162530.0004
Fetch class attribute name0.00200.250770.0003
XML
Image XML parsing0.00100.129130.0003
class_abstraction
Instantiating content class attribute0.00000.003090.0000
General
dbfile0.00330.4253290.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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