I would like to override the 'lightbox' function in Grav\Common\Page\Medium for my Bootstrap based theme. (i.e. add data-toggle/data-target to the link). I am not clear where I should be doing this - I would rather not touch anything in 'system' and am not sure if this means I need both a plugin and theme (or if this is possible).
Archive
That functionality in the Medium class adds a rel="lightbox" to a link, and other data attributes so it's ready to be used by Lightbox plugins such as https://github.com/getgrav/grav-plugin-featherlight#implementing-a-lightbox-with-featherlight. So if you want to customize it, you should touch the plugin (or fork it)
Thanks flaviocopes, I have been using the rel="lightbox" attribute to wrap some bootstrap markup
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1366 | 9 years ago | ||
| 2 | 940 | 9 years ago | ||
| 2 | 4069 | 9 years ago | ||
| 1 | 2960 | 9 years ago | ||
| 3 | 1124 | 9 years ago |