And how would you call a singleton in the new version?
I have tried:
- $primary_menu = Cockpit::instance()->module(āFrontpageā)->find(āprimary_menuā);
- $frontpage = Cockpit::instance()->module(āFrontpageā);
And how would you call a singleton in the new version?
I have tried:
@tokant If Frontpage itās the singleton, Have you try this :
$frontpage = Cockpit::instance()->module(ācontentā)->find(āfrontpageā, ['filter' => ['_state' => 1]]);
$primary_menu = Cockpit::instance()->module(ācontentā)->item('primary_menu');
$frontpage = Cockpit::instance()->module(ācontentā)->item('Frontpage');
Is it still possible to get a specific locale?
In previous version, we could add this option [ālangā => $locale]
Something like this:
Cockpit::instance()->module(ācontentā)->items(ādictionaryā, [ālangā => $locale])
Thanks
Yes:
Cockpit::instance()->module(ācontentā)->items('dictionary', [], ['locale' => $locale]);
Thanks for the answer and all your work. New version looks really nice.