-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: How to add new cascade and use it #8472
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @linonetwo – I am delighted at your willingness to tackle documentation tasks, and the standard of your contributions is very good.
|
||
!!! The default template as a fallback | ||
|
||
(omitted here, see the latest version on [ext[Github|https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/core/ui/ViewTemplate/tags/default.tid]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to be self contained and transclude the shadow tiddler as a subtiddler from the core plugin. This will ensure that the real shadow is displayed even if it has been overridden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires /dev doc site use prerelease of TW, will it be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we merge this into master branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @linonetwo yes it looks like this will need to be merged to "master"
@Jermolene There remains two concerns to discuss. |
Hi @linonetwo are there any remaining concerns? |
da0e5db
to
55d205d
Compare
I don't know how to transclude subtiddler, there is a post https://talk.tiddlywiki.org/t/how-to-transclude-a-subtiddler-with-template-in-tiddlywiki/7100 , I tried the solution on it
and it is not working. I see, the syntax is correct, just can't use template. And the render result of it is empty string. Use view widget instead. But it become plain text, don't have code style. Wrap with pre > code cause transclude fail. |
Your code is wrong. The transclude-widget does not have a template parameter If you use:
It works just fine at: https://tiddlywiki.com/prerelease/ see: prerelease |
@@ -29,6 +30,6 @@ and a listener is registered at the store which executes the refresh function of | |||
[[Techniques for including other tiddlers and Templates|Transclusion and TextReference]] are finally used in [[$:/core/ui/PageTemplate]] to build the TiddlyWiki UI only from tiddlers written in WikiText (with widgets implemented in javascript): | |||
|
|||
For example to implement the list of open wiki pages the [[$:/core/ui/PageTemplate]] contains a [[navigator widget|$:/core/modules/widgets/navigator.js]] which maintains a list of open tiddlers in a field of [[$:/StoryList]] and handles events like ``tm-navigate`` by adding a tiddler specified as parameter to the top of the list in [[$:/StoryList]]. | |||
The [[story tiddler|$:/core/ui/PageTemplate/story]] transcluded in [[$:/core/ui/PageTemplate]] then uses a ~ListWidget to transclude all tiddlers in [[$:/StoryList]] through a special template [[$:/core/ui/ViewTemplate]]. | |||
The [[story tiddler|$:/core/ui/PageTemplate/story]] transcluded in [[$:/core/ui/PageTemplate]] then uses a ~ListWidget to transclude all tiddlers in [[$:/StoryList]] through a special template [[$:/core/ui/ViewTemplate]]. All view template can be further override using [[Cascade Mechanism]]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the added sentence does not make sense. -- At least I do not understand it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Thanks, but this render a tag, instead of a codeblock. Jeremy want to transclude the raw tiddler content as codeblock here. I leave a link to |
Thanks @linonetwo. I am afraid that this hasn't turned out as well as I had hoped, and I am really struggling to follow it. I don't have time at the moment to edit it properly, but perhaps another English-speaking contributor may be prepared to help. |
Hi @linonetwo sorry if that sounds harsh, I did start to work through some edits but I found it hard to track the intention in some areas. Here are my changes: Partially completed edits
|
Never mind, I'm also updating it. Please take your time review other PRs first. |
@pmario Thanks, that works, I'm using it. And I update it to the forum https://talk.tiddlywiki.org/t/how-to-transclude-a-subtiddler-with-template-in-tiddlywiki/7100/5 |
No description provided.