Scope TOC to article body only and use language string for title
- Move data-toc-scope from outer column to .article-content div so
the TOC only sees headings inside the article body, ignoring page
headers and article titles.
- Pass $scope explicitly in the JS auto-init so headings outside the
article content are never picked up.
- Replace hardcoded article title in TOC heading with a
TPL_MOKOCASSIOPEIA_TOC_TITLE language string ("Table of Contents").
- Add Text use statement to both toc-left.php and toc-right.php.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -178,7 +178,8 @@
|
||||
$(function() {
|
||||
$('nav[data-toggle="toc"]').each(function(i, el) {
|
||||
var $nav = $(el);
|
||||
Toc.init($nav);
|
||||
var $scope = $('[data-toc-scope]');
|
||||
Toc.init({ $nav: $nav, $scope: $scope.length ? $scope : $(document.body) });
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
Reference in New Issue
Block a user