Highlighted

Adding Experience Fragment to Page

mark_julianp181

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

Highlighted
Highlighted

send2viki

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.