I will try to show you the two different tables that I would like to
mix into 1 - and make into a table.
The idea is that I make a TeacherTemplate - and a Button which a call
NewTeacher.
The button makes a new tiddler with the template and I name the
tiddler with a teachers initials.
I have another template for the students working in a similar way -
except I spell their names fulltext.
I tag the students with the initials of their teacher - and the result
is that the teachers tiddler gets a sortable table with students names
and data + up to 5 toggletags - for markings like: sick leave and
going home/staying at school for the weekend a.s.o - I'm working at a
Danish boarding school.
Here's my first tiddler fetching information from the students
tiddlers (This is the one that I would like to be able to "fetch" the
title of the tiddler that it is contained in "Teachers initials"):
<<forEachTiddler
where
'tiddler.tags.contains("TeachersInitials") && tiddler.data("Name")'
sortBy 'tiddler.data("Name")'
write
'(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
[["+tiddler.data("House")+"]]|[["+tiddler.data("Room")
+"]]|"+tiddler.data("Date")+"|\n" : ""'
begin '"|sortable|k\n|!#|Name|House|Room|Date|h\n"'
end 'count+" this teachers students\n"'
none '"No students for this teacher\n"'
>>
The second tiddler that I have had so much trouble in "handcrafting"
is this one(I would like it to be integrated in the first one - plus
the toggletags and fetching the students names from tiddlers tagged
with the title of the teachers tiddler (initials)):
|sortable|k
|NamesofStudents|toggles[[A]]|[[B]]|[[C]]|[[D]]|h
| @@Remember to update!@@ |!<<tiddler AUpdate>>|!<<tiddler BUpdate>>|!
<<tiddler CUpdate>>|!<<tiddler DUpdate>>|
|[[Student1]]|<<toggleTag A [[Student1]] nolabel>>|<<toggleTag B
[[Student1]] nolabel>>|
<<toggleTag C [[Student1]] nolabel>>|<<toggleTag D [[Student1]]
nolabel>>|
|[[Student2]]|<<toggleTag A [[Student2]] nolabel>>|<<toggleTag B
[[Student2]] nolabel>>|
<<toggleTag C [[Student2]] nolabel>>|<<toggleTag D [[Student2]]
nolabel>>|
|[[Student3]]| etc|etc ....
I'm sure that Ken answered my question - but I'm so unfamiliar with
programming/writing code - that I cannot figure out where I am doing
sth wrong.... sorry.
If somebody would try to connect these ideas into one table - and
(maybe) give me the full code and context - then I just might make it
work - and it could spare me hours of typing (Next time I'll set it
up.... )
A danish novice trying to keep up the good spirit :-)
Måns Mårtensson