Author
|
Message
|
Massimo Sanna
|
Monday 08 May 2006 12:22:14 am
Hi there,
I'm working on a project which has a resume section, so that visitors can submit their resume to the company. It consists of more than 50 fields, a picture and an attachment, so I created a custom class, with anonymous creation rights.
Since the 3.8 upgrade, if I try to create a new resume, there's an additional page which asks me in which language I'd like to create it. Until 3.7 it used to work without asking this, and the content took the language of the current siteaccess (I have ita-IT and eng-US). How can I tell ezpublish to choose the proper language looking at the current siteaccess?
Thanks in advance, Max
|
Łukasz Serwatka
|
Monday 08 May 2006 12:32:50 am
Hi Max, I haven't test it but try put this code in form which you use to create new object.
<input type="hidden" name="ContentObjectLanguageCode" value="{ezini('RegionalSettings', 'Locale')}" />
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|
Massimo Sanna
|
Monday 08 May 2006 12:59:05 am
Hi Lukasz,
yours seemed to be a good idea, but I tried it with no luck. This is the code I use to trigger content creation now:
{section show=fetch('content','node',hash('node_id',273)).can_create}
<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="NodeID" value="273" />
<input type="hidden" name="ClassID" value="23" />
<input type="hidden" name="ContentObjectLanguageCode" value="{ezini('RegionalSettings', 'Locale')}" />
<input class="button" type="submit" name="NewButton" value="{'Send your resume'|i18n('design/lavoro')}" />
</form>
{/section}
|
Łukasz Serwatka
|
Monday 08 May 2006 1:07:05 am
OK, I have looked on code, try with:
<input type="hidden" name="ContentLanguageCode" value="{ezini('RegionalSettings', 'Locale')}" />
ContentObjectLanguageCode this variable is used in edit form.
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|
Massimo Sanna
|
Monday 08 May 2006 1:13:16 am
Great, thanks you a lot! This works as expected!
Cheers, Max
|
Łukasz Serwatka
|
Monday 08 May 2006 1:22:54 am
Great, you are welcome Max :)
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|
Massimo Sanna
|
Monday 08 May 2006 1:26:04 am
I hope we'll meet in Skien in June so ;)
|
Łukasz Serwatka
|
Monday 08 May 2006 1:28:41 am
Of course, looking forward to meet you in Skien :)
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|
Daniele Nocentini
|
Friday 07 July 2006 9:14:08 am
I try this code but doesn't works!
<form method="post" action={concat("/content/edit/",$user.contentobject_id)|ezurl}>
<input type="hidden" name="ContentLanguageCode" value="{ezini('RegionalSettings', 'Locale')}" />
<input class="button" type="submit" value={"Edit"|i18n("design/traduzioni")} />
</form>
The content/edit_languages.tpl template show again.
Antica Bottega Digitale srl
http://www.abd.it
|
Kristof Coomans
|
Friday 07 July 2006 10:45:05 am
Hi Daniele
Lukasz's code is meant for creating a new object by posting to the content/action view. Take a look at http://ez.no/community/forum/setup_design/disabling_language_selection_in_forum for a solution to define the language in the edit url.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|