1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-25 03:34:50 +00:00

Initial support for switching page templates (#4979)

* Add support for switching page templates

* Revert "Add support for switching page templates"

This reverts commit dbf7682d47.

* Adopt Jeremy's approach to page template switching instead

* Fix default value of recursion marker

* Fixed issue with conditional check
This commit is contained in:
saqimtiaz
2020-11-07 10:51:01 +01:00
committed by GitHub
parent 2b31c7a509
commit 5aa4e4cb68
4 changed files with 18 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ exports.synchronous = true;
// Default story and history lists
var PAGE_TITLE_TITLE = "$:/core/wiki/title";
var PAGE_STYLESHEET_TITLE = "$:/core/ui/PageStylesheet";
var PAGE_TEMPLATE_TITLE = "$:/core/ui/PageTemplate";
var PAGE_TEMPLATE_TITLE = "$:/core/ui/RootTemplate";
// Time (in ms) that we defer refreshing changes to draft tiddlers
var DRAFT_TIDDLER_TIMEOUT_TITLE = "$:/config/Drafts/TypingTimeout";
@@ -52,7 +52,7 @@ exports.startup = function() {
}));
// Display the $:/core/ui/PageTemplate tiddler to kick off the display
$tw.perf.report("mainRender",function() {
$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget});
$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget, recursionMarker: "no"});
$tw.pageContainer = document.createElement("div");
$tw.utils.addClass($tw.pageContainer,"tc-page-container-wrapper");
document.body.insertBefore($tw.pageContainer,document.body.firstChild);