Copied to clipboard

Flag this post as spam?

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

  • Dmitriy 168 posts 588 karma points
    Apr 23, 2019 @ 11:32

    Multilingual 404 error with xpath

    Hello, Umbracians

    Here is my current umbracoSettings.config


    All I want it make the 404 page multilingual searching independent of id:

        <errorPage culture="default">0001</errorPage>
        <errorPage culture="en-US">0002</errorPage>

    But, unfortunatly I am not famialiar with xpath syntaxt so well. How to imlement something like that:

            <errorPage culture="default">//errorPage[nodeName='404' & Culture='fr-fr']</errorPage>
            <errorPage culture="en-US">//errorPage[nodeName='404' & Culture='en-us']</errorPage>

    Is it possible with xpath?

  • Matt Barlow | 164 posts 739 karma points c-trib
    Apr 23, 2019 @ 12:15
    Matt Barlow |

    You can but you would have to add a culture property to your document type for the errorPage:

    So this would match the first document of type errorPage, that is called 404 and has a property of culture called fr-fr.

    (//errorPage[@nodeName='404' and culture='fr-fr'])[1]
Please Sign in or register to post replies

Write your reply to: