Get page path or component path inside dialog field validator

Avatar

Avatar
Validate 1
Level 2
danc13675873
Level 2

Likes

6 likes

Total Posts

19 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
danc13675873
Level 2

Likes

6 likes

Total Posts

19 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
danc13675873
Level 2

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)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

20-05-2019

Hi,

use below -

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

Answers (0)