Skip to content
This repository has been archived by the owner on Dec 18, 2020. It is now read-only.

single , multiple or checkbox translation access #665

Open
ycamus opened this issue Apr 11, 2016 · 3 comments
Open

single , multiple or checkbox translation access #665

ycamus opened this issue Apr 11, 2016 · 3 comments

Comments

@ycamus
Copy link

ycamus commented Apr 11, 2016

| Bug? | no
| New Feature? | yes
| Sulu Version | 1.2.0-RC4

Actual Behavior

when using content type single , multiple or checkbox in page definition, you define values and meta
(translation).
When it come to ui, view, only Value is returned, instead of both value and translation.

Expected Behavior

Get the translation and value in View/ui

Steps to Reproduce

use the page type : Exemple
single should output "option 1" (translation) it does output "option1"

Possible Solutions

Switch the return value to array.

@danrot
Copy link
Contributor

danrot commented Apr 11, 2016

Sadly it is not as easy as described here... People might also want to use the checkboxes as a kind of setting, and just check in the twig template if the selection contains some value. You could think of a group of checkboxes defining if the template should display specific parts.

I'd say we pass the meta stuff via the view variable. Maybe we could also only pass the current localization (including fallbacks in case the exact language does not exist).

Or maybe we could even introduce another meta variable? Because the view variable is actually holding whatever has been selected by the content manager, and the meta stuff is coming from a configuration file.

@ycamus
Copy link
Author

ycamus commented Apr 11, 2016

my pov would say the hard part is getting the data without breaking the current state.

If you change content.single = value to content.single.value=value, that would break the current users twig on update
Unless you go for something like __toString (){ return value) and keep the 2 data?

But if you go for view.single.... i wouldn't mind either, will just need a bit of doc about it, so ppl dont get lost.

@danrot
Copy link
Contributor

danrot commented Apr 11, 2016

There is already a view variable, where it would suit better IMO, since, as I described, it is more configuration like content. But however, that would also be a BC break 😕

@chirimoya chirimoya added this to the Release 1.3 milestone Apr 15, 2016
@danrot danrot modified the milestones: Release 1.4, Release 1.3 Jul 4, 2016
@chirimoya chirimoya modified the milestones: Release 1.5, Release 1.4 Nov 3, 2016
@danrot danrot modified the milestones: Release 1.6, Release 1.5 Feb 27, 2017
@chirimoya chirimoya modified the milestones: Release 2.0, Release 1.6 Jun 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants