Adding Experience Fragment to Page

Avatar

Avatar
Validate 1
Level 2
mark_julianp181
Level 2

Likes

7 likes

Total Posts

16 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
mark_julianp181
Level 2

Likes

7 likes

Total Posts

16 posts

Correct reply

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

15-04-2018

Hi,

Is there any way to add an experience fragment to a page dynamically using HTL or get requests?

I keep getting forbidden when trying to access experience fragments using get requests like in the code below :

     function getFragment(path) {

            $.ajax({

                type: 'GET',

                url: path,

                success: function(xf) {

                    $("#article-container")

                        .append(xf);

                }

            });

        }

Regards,

Mark

Replies

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

277 likes

Total Posts

1,502 posts

Correct reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

277 likes

Total Posts

1,502 posts

Correct reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

16-04-2018

You need to make sure correct read access for that path based the current user who is trying to access XF

Avatar

Avatar
Validate 1
Level 2
mark_julianp181
Level 2

Likes

7 likes

Total Posts

16 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
mark_julianp181
Level 2

Likes

7 likes

Total Posts

16 posts

Correct reply

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

16-04-2018

I have access to the experience fragments and I am not having the same problems with content fragments.

Avatar

Avatar
Validate 1
Level 1
s1101v
Level 1

Likes

0 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
View profile

Avatar
Validate 1
Level 1
s1101v
Level 1

Likes

0 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
View profile
s1101v
Level 1

03-07-2020

@mark_julianp181  - I am looking for similar solution to load the XF content based on the drop down selection, In the JCR node, I have only the reference path of the XF variation only. Not sure how to get the complete DIV of the XF to replace the content on the page. Please provide your inputs if you have already implemented this solution.