Well, those values in the table have to come from somewhere. Typically 
those would be from fields. I'll demonstrate with one field, and you can 
see if that gets you on your way.

Modify your Templatepersontable:

@@.persontable
|>| @@display:block;width:23em;<div class="lightgrey">''[Tiddler-specific 
title]''</div>@@ |
|^@@display:block;width:6.5em;{{!!value1}}@@ |@@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;@@ |
@@

The {{!!value1}} entry will transclude values from a field, "value1". Note 
that it won't be bold -- add font-family to your style definition for that.

Now add the field "value1" to your "Person 1" tiddler and put a value in it 
(e.g. "Hi There!"). You add fields at the bottom of the edited tiddler, BTW.

Now for the text in your Person 1 tiddler, put: {{||Templatepersontable}}. 
The double pipe symbols mean to transclude the tiddler, using the current 
tiddler as though it were the template's tiddler. Sorry if that sounds 
munged -- just try it.

Now the table will appear and the field will be filled with the value from 
the "Person 1" value1 field.

You can even adapt your template so that it will get automatically applied 
to any tiddler that has a "value1" field (or some specified tag) without 
having to type in the template each time.. But I'm out of time for the 
moment.

Good luck!
-- Mark
On Thursday, October 11, 2018 at 9:32:24 PM UTC-7, Rafael Aprato wrote:
>
> 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/5040df2e-1f56-4a0a-bc7b-5638368edc45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to