Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Feb 21, 2016 @ 02:36
    Craig100
    0

    Vorto Editor not found

    Fresh 7.4.1 site with latest Vorto installed.

    Created Vorto dataType as a test for a textstring.

    Inserted Vorto textstring in a docType. The editor showed: {{currentLanguage.name}} {{currentLanguage.nativeName}}

    When I open the content page to edit, there is no textstring editor within the Vorto frame and the following error shows in a red bar at the bottom of the page:

    Request error: The URL returned a 404 (not found): 
    views/directives/umb-editor.html
    

    This is a fresh, unused, empty install apart from the two basic templates and a docType with a single property. No files have been deleted.

    Can anyone advise if Vorto works properly in 7.4.1?

    Also finding that with the new ModelsBuilder working, @Model.Title gives an error on the Title of "VortoValue is inaccessible due to it's protection level" Is there a way of using Vorto with strongly typed Models?

    Thanks,

    Craig

  • Alessandro Bellisai 30 posts 120 karma points
    Feb 21, 2016 @ 09:19
    Alessandro Bellisai
    2

    Hi Craig

    Try to edit the vorto.js, changing path of umb-editor.html file to umb-property-editor.html:

        return {
            require: "^form",
            restrict: "E",
            rep1ace: true,
            link: link,
            //templateUrl: 'views/directives/umb-editor.html',
            templateUrl: 'views/components/property/umb-property-editor.html',
            scope: {
                propertyEditorView: '=view',
                config: '=',
                language: '=',
                propertyAlias: '=',
                value: '='
            }
        };
    

    Alessandro

  • Craig100 1136 posts 2523 karma points c-trib
    Feb 21, 2016 @ 10:26
    Craig100
    0

    Thanks Alessandro, that worked a treat :)

    Should probably have put the ModelsBuilder issue in a separate thread. I'd like to use it but might have to ditch it if I can't get Vorto values out (yet ;) ).

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 22, 2016 @ 06:18
    Jeroen Breuer
    0

    Hello,

    For Vorto and the ModelsBuilder to work you need to override the property in a partial class. Something like this: https://github.com/jbreuer/1-1-multilingual-example/blob/master/Sources/Umbraco.Extensions/Models/UmbNewsItem.cs#L31

    In the there you just need to use GetVortoValue instead of GetPropertyValue. You can find more info + a good example in this blog: http://24days.in/umbraco/2015/multilingual-vorto-nested-content/

    It's still using the old version of the ModelsBuilder, but everything should work the same.

    It's best to generate the models with the Visual Studio extension so it's easier to override the properties. You can download it here: https://visualstudiogallery.msdn.microsoft.com/ef0896ab-e2eb-47fc-8fcb-79dad0f66e30

    More info in this topic: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/75079-74-models-builder

    Jeroen

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 23, 2016 @ 07:34
    Jeroen Breuer
    0

    Hello,

    Did the above examples help?

    Jeroen

  • Craig100 1136 posts 2523 karma points c-trib
    Feb 24, 2016 @ 19:12
    Craig100
    0

    Hi Jeroen,

    Thanks for the links. I've only just got back on to the job. I have the models builder working and it looks like you're saying that for each and every Vorto dataType I'd have to create a partial class.

    The 7.4.1 site I'm building will be using the Grid and I notice https://our.umbraco.org/forum/developers/extending-umbraco/73997-problem-using-umbraco-73-with-vorto-extension-and-grid-data-type hasn't had an answer yet so I'm wondering if I'm biting off more than I can chew and making things too "bleeding edge" for the relatively simple site I'm building with it's limited budget.

    I'm thinking I'll use the ModelsBuilder where it makes sense but maybe not Vorto just yet. Having noted this: https://our.umbraco.org/projects/developer-tools/hybrid-framework-for-umbraco-v7/anything/60459-Umbraco-72-and-the-Grid-Layout if there are issues then I'll revert to the old way of doing it.

    It's nice to try new things but sometimes getting there too early can be expensive ;)

    Craig

Please Sign in or register to post replies

Write your reply to:

Draft