hi i descovered that the "rel=" link which opens content in the new mediabox in typolight 2.8 doesn't work for pages klicked from the navigation.

leo suggests to adapt the following moo_mediabox...

now i got 2 questions:

1.) how do i add a class to the filter and how do i have to use the css class
2.) where do i place the modified file so it won't be overwritten by an update – in the templates folder?

http://dev.typolight.org/issues/1571

<?php

// Add mediabox style sheet
$GLOBALS['TL_CSS'][] = 'plugins/mediabox/css/mediabox.css|screen';

?>

<script type="text/javascript" src="plugins/mediabox/js/mediabox.js"></script>
<script type="text/javascript">
<![CDATA[//><!--
Mediabox.scanPage = function() {
var links = $$("a").filter(function(el) {
return el.rel && el.rel.test(/^lightbox/i);
});
$$(links).mediabox({/* Put custom options here */}, null, function(el) {
var rel0 = this.rel.replace(/[[]|]/gi," ");
var relsize = rel0.split(" ");
return (this == el) || ((this.rel.length > 8) && el.rel.match(relsize[1]));
});
};
window.addEvent("domready", Mediabox.scanPage);
//--><!]]>
</script>