Get page path or component path inside dialog field validator

danc13675873

20-05-2019

How can I get the current page path e.g. /content/site/en/pageName or the current component path e.g. /content/site/en/pageName/jcr:content/component from within a dialog field validator (foundation.validation.validator)

registry.register("foundation.validation.validator", {

    selector: "[data-foundation-validation=someValidator]",

    validate: function(el) {

     // Some code to get page or component URL to make AJAX call

    }

});

Accepted Solutions (1)

Accepted Solutions (1)

Arun_Patidar

MVP

20-05-2019

Hi,

use below -

var page = Granite.author.pageInfoHelper.json.status.path

Answers (0)