mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Pagebanner: Fix TOC not working from header; also, hide TOC always, not just on 2nd+ load [#610]
This commit is contained in:
@@ -195,7 +195,8 @@ public class Xoh_page_wtr_wkr {
|
||||
if (page.Root() != null) { // NOTE: will be null if blank; occurs for one test: Logo_has_correct_main_page; DATE:2015-09-29
|
||||
page.Html_data().Toc_mgr().Clear(); // NOTE: always clear tocs before writing html; toc_itms added when writing html_hdr; DATE:2016-07-17
|
||||
wiki.Html_mgr().Html_wtr().Write_doc(tidy_bfr, ctx, hctx, page.Root().Data_mid(), page.Root());
|
||||
if (wiki.Html_mgr().Html_wtr().Cfg().Toc__show())
|
||||
if (wiki.Html_mgr().Html_wtr().Cfg().Toc__show()
|
||||
&& page.Html_data().Xtn_pgbnr().Show_toc_in_html())
|
||||
gplx.xowa.htmls.core.wkrs.tocs.Xoh_toc_wtr.Write_toc(tidy_bfr, page, hctx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||
package gplx.xowa.htmls.core.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*;
|
||||
public class Xoh_html_wtr_cfg {
|
||||
public boolean Toc__show() {return toc__show;} public Xoh_html_wtr_cfg Toc__show_(boolean v) {toc__show = v; return this;} private boolean toc__show;
|
||||
public boolean Pgbnr__show() {return pgbnr__show;} public Xoh_html_wtr_cfg Pgbnr__show_(boolean v) {pgbnr__show = v; return this;} private boolean pgbnr__show;
|
||||
public boolean Lnki__id() {return lnki__id;} public Xoh_html_wtr_cfg Lnki__id_(boolean v) {lnki__id = v; return this;} private boolean lnki__id;
|
||||
public boolean Lnki__title() {return lnki__title;} public Xoh_html_wtr_cfg Lnki__title_(boolean v) {lnki__title = v; return this;} private boolean lnki__title;
|
||||
public boolean Lnki__visited() {return lnki__visited;} public Xoh_html_wtr_cfg Lnki__visited_y_() {lnki__visited = true; return this;} private boolean lnki__visited;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Xoh_hdr_html {
|
||||
|
||||
// write TOC tag if (a) TOC enabled and (b) 1st hdr
|
||||
if ( hdr.First_in_doc()
|
||||
&& cfg.Toc__show()
|
||||
&& cfg.Toc__show()
|
||||
&& page.Wtxt().Toc().Enabled()
|
||||
&& !page.Wtxt().Toc().Flag__toc()) // __TOC__ not specified; place at top; NOTE: if __TOC__ was specified, then it would be placed wherever __TOC__ appears
|
||||
gplx.xowa.htmls.core.wkrs.tocs.Xoh_toc_wtr.Write_placeholder(page, bfr);
|
||||
|
||||
Reference in New Issue
Block a user