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).
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