eZ Community » Forums » eZ Publish 5 Platform » Global variable ezpublish.legacy empty
expandshrink

Global variable ezpublish.legacy empty

Global variable ezpublish.legacy empty

Tuesday 30 April 2013 9:59:45 am - 4 replies

Hi! I'm trying to access some sorely needed values inside a full location view template (Twig). In this exact case I need to know the current language, but none of the other properties listed over at https://confluence.ez.no/display/EZP/Twig+Helper are available either for that matter.

In my ezpublish.yml, I have activated legacy_mode: true (I think this is a prerequisite for ezpublish.legacy to be populated?) for my siteaccess group of which my siteaccess is a part of.

Any clues?

Tuesday 30 April 2013 12:59:39 pm

If you're using the {{ content.fields.someField. form and need the language to provide the right value, an easier way is to use {{ content.getField('someField') }}. That will internally select the language. 

Tuesday 30 April 2013 1:28:06 pm

That's actually super helpful, Joe. Not exactly what I asked for, but I still need it. blunk.gif Emoticon

If anyone know why the globals aren't populated, shout out!

Tuesday 30 April 2013 1:52:13 pm

Which version is this?
This has afaik nothing to do with legacy_mode, but more to do with getting access to settings from templates which are being for instance discussed here: https://github.com/ezsystems/ezpublish-kernel/pull/280

Tuesday 30 April 2013 2:24:00 pm

I'm on 5.1.0beta1.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from