Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Jacobsen 597 posts 2395 karma points
    Jul 05, 2019 @ 10:52
    Bo Jacobsen
    0

    umb-property requires culture and how do i get this?

    Hi all.

    Using Umbraco 8.0.2 and are making a gridEditor in the backoffice as i normally do with the umb-property directive in my umb-overlay.

    But this time my document is set to 'Allow varying by culture' and the property with the grid is also set to 'Allow varying by culture'.

    Now the umb-property is requiring a culture and not just the label and description.

    My question is, how do i get the culture?

        <umb-panel ng-controller="My.OverlayController as vm">
            <umb-pane>
                <umb-property property="vm.property.multiurlpicker">
                    <umb-property-editor model="vm.multiurlpicker"></umb-property-editor>
                </umb-property>
            </umb-pane>
        </umb-panel>
    
    (function () {
        "use strict";
    
        function myOverlayController($scope, localizationService, synergiService) {
    
            var vm = this;
    
            vm.property = {
                multiurlpicker: {
                    culture: "da-DK", // How?
                    label: null,
                    description: null
                }
            };
            vm.multiurlpicker = {
                view: "multiurlpicker",
                config: {
                    maxNumber: 1,
                    minNumber: 0
                },
                value: $scope.model.dialogModel.link
            };
    
            $scope.$watch('vm.multiurlpicker.value', function (newVal, oldVal) {
                $scope.model.dialogModel.link = newVal;
            });
    
            localizationService.localizeMany([
                "my_locallizeLabel",
                "my_locallizeDescription"])
                .then(function (data) {
                    vm.property.multiurlpicker.label = data[0];
                    vm.property.multiurlpicker.description = data[1];
                });
        }
    
        angular.module("umbraco").controller("My.OverlayController", myOverlayController);
    })();
    
  • Bo Jacobsen 597 posts 2395 karma points
    Jul 05, 2019 @ 11:34
    Bo Jacobsen
    100

    I found out why.

    umb-panel or umb-pane was the cheater. When i removed them it worked fine again.

Please Sign in or register to post replies

Write your reply to:

Draft