Hey all,
Apologies for the newbie question, but I've read the official documentation
about transclusion, templates and widgets and I can't make sense of it (or
what I should be reading to begin with). I welcome a link to more specific
help, or just to what I should focus on.
I'm trying to build a table template that shows up partly filled in a
tiddler when I want. And then in the new tiddler, I enter the
tiddler-specific values. The key thing I'm looking for is to be able to
modify the table fixed values or formatting without having to change it in
every page. So if, for example, I decide to change the background color in
the title, I can do so in one edit for all the hundreds of tiddlers with
the table.
For example, I want to have this in a tiddler titled 'Person 1':
@@.persontable
|>| @@display:block;width:23em;<div class="lightgrey">''[Tiddler-specific
title]''</div>@@ |
|^@@display:block;width:6.5em;''Value 1''@@ |@@display:block;width:15em;
Tiddler-specific text 1@@ |
|^@@display:block;width:6.5em;''Value 2''@@ |@@display:block;width:15em;
Tiddler-specific text 2@@ |
|^@@display:block;width:6.5em;''Value 3''@@ |@@display:block;width:15em;
Tiddler-specific text 3@@ |
@@
So in another called 'Templatepersontable', I have this:
@@.persontable
|>| @@display:block;width:23em;<div class="lightgrey">''[Tiddler-specific
title]''</div>@@ |
|^@@display:block;width:6.5em;''Value 1''@@ |@@display:block;width:15em;@@ |
|^@@display:block;width:6.5em;''Value 2''@@ |@@display:block;width:15em;@@ |
|^@@display:block;width:6.5em;''Value 3''@@ |@@display:block;width:15em;@@ |
@@
And in CSS I have:
.persontable {
margin-left: auto;
margin-right: 0;
margin-left: 1em;
float: right;
font-size: 0.8em;
}
.persontable td,
.persontable tr,
.persontable th,
.persontable tbody
{ border :0 !important;
padding-top: 0.5em;
}
.lightgrey {
background-color:lightgrey;
}
Now, I can write this in the 'Person 1' tiddler, and the table comes up:
{{Templatepersontable}}
But I can't fill the blank cells with the values I want.
Any tips on how to make this work, or what should I have been reading and
what terms to look after in order to understand it? Hard to make sense of
the "Transclusion in WikiText" in tiddlywiki.com.
Best regards
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/afaee9cd-6d17-4b65-93cc-0e6c0ef151c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.