Moodle 3.4. There is a task - to open links to extra resources with js libraries like "lightbox" | "fancybox" and so on.
The task is to ensure that the page on which the link is located:
1. A script from the "lightbox" | "fancybox" library supposed to be connected.
2. The <body> tag must have a specific class.
3. A certain <a> tag must have a certain attribute.
I'm trying to modify the mod / url module.
I change the file lib.php, view.php. But all this is a roulette game guess which line passes the desired parameter to course / view.php.
I understand that somewhere supposed to be
$ PAGE-> requires-> js
$ PAGE-> requires-> css
$ PAGE-> add_body_class
but, all my attempts did not give the desired result, and much time has already been spent. This can continue indefinitely.
Help me please. How can I pass additional attributes to tags and connect libraries through the mod / url plugin?
Thank you in advance!
General developer forum
Open external links in the pop-up window using lightbox | fancybox
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.