0

I have a page that uses Magnific Popup to show popups (http://dimsemenov.com/plugins/magnific-popup/documentation.html). This popup it being loaded with the following peace of Javascript:

$('.popoup-team').magnificPopup({
    type: 'ajax'
});

There an overview page (which is the page that you can click the popup) and when clicking the popup, another page is loaded with ajax, which only contains the popup.

    {exp:channel:entries
    channel="team"
    dynamic="no"

}
    <div class="ajax-text-and-image white-popup-block">
        <div class="row">
            <div class="col-xs-4 team-image">
                {exp:ce_img:single
                    src="{team_afbeelding}"
                    class="img-responsive"
                    width="279"
                    height="279"
                    crop="yes"
                }
            </div>
            <div class="col-xs-8">
                <h1>{title}</h1>
                <h2>{team_functie}</h2>
                {team_beschrijving}
            </div>
        </div>
    </div>
{/exp:channel:entries}

The problem is that the id of the entry that I'm trying to show in the popup is established in url of the overview page, and I'm unable to reach that id in the detail page that contains the popup.

So the URLS are: Overview page URL: domain.com/team/25 Detail page URL: domain.com/team/detail

Does anybody know a solution for this?

0

Never mind, I was thinking way too complicated, obviously... Of course while loading the popup in the overview page, I could just change the link into

<a href="team/detail/{entry_id}"/>

Instead of overthinking it and trying to put the entry_id into an id and retrieving it through jQuery...

1
  • Just for posterity's sake: you could also have not have used dynamic="off", or, failing all else, used {segment_3} or similar. – Ingmar Dec 1 '15 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.