Hi again - I post this bonus-question here, because it's another
syntaxproblem in the same context...
I would like to have 2 extra columns in the resulting table that
toggles tags on the tiddler in the corresponding row.
Like this: <<toggleTag SomeTag [[Tiddler title from corresponding
row]] nolabel>>
In full context:
<<forEachTiddler
where
'tiddler.tags.contains("
this tiddlers title <- This is what I need - What is the correct
syntax/word for fetching it??
") && tiddler.data("Name")'
sortBy 'tiddler.data("Name")'
write
'(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
[["+tiddler.data("A")+"]]|[["+tiddler.data("B")
+"]]|"+<<toggleTag A [[Tiddler title from corresponding row]]
nolabel>>|"+<<toggleTag B [[Tiddler title from corresponding row]]
nolabel>>"|\n" : ""'
begin '"|sortable|k\n|!#|Name|A|B|ToggleTagA|ToggleTagBh\n"'
end 'count+" Tiddlers tagged with this tiddlers title\n"'
none '"No tiddlers tagged with this tiddlers title\n"'
Is this possible??
Right now I'm doing it "by hand" and it's very tedious.
The problem is to integrate the toggleTagmacro into the
'forEachTiddler where ... macro'.
I've tried - but putting toggleTagmacro into forEachTiddler macro
breaks the forEachTiddler macro - when I try....
If You know how to do this - I would be very happy to know!!
Here's my actual code for one of my 30 tiddlers - It would be very
nice to be able to make a template instead - then I would be able to
use my tw as a template for a new set of data:
|sortable|k
|[img(25%,auto)[Name|http://xxxxxx.jpg]]|[[A]]|[[B]]|[[C]]|[[D]]|h
| @@Remember to update!@@ |!<<tiddler AUpdate>>|!<<tiddler BUpdate>>|!
<<tiddler CUpdate>>|!<<tiddler DUpdate>>|
|[[1]]|<<toggleTag A [[1]] nolabel>>|<<toggleTag B [[1]] nolabel>>|
<<toggleTag C [[1]] nolabel>>|<<toggleTag D [[1]] nolabel>>|
|[[2]]|<<toggleTag A [[1]] nolabel>>|<<toggleTag B [[2]] nolabel>>|
<<toggleTag C [[2]] nolabel>>|<<toggleTag D [[2]] nolabel>>|
|[[3]]|<<toggleTag A [[3]] nolabel>>|<<toggleTag B [[3]] nolabel>>|
<<toggleTag C [[3]] nolabel>>|<<toggleTag D [[3]] nolabel>>|
|[[4]]|<<toggleTag A [[4]] nolabel>>|<<toggleTag B [[4]] nolabel>>|
<<toggleTag C [[4]] nolabel>>|<<toggleTag D [[4]] nolabel>>|
etc|etc ....
YS Måns Mårtensson
On 25 Feb., 10:52, Måns <[email protected]> wrote:
> I've searched the group and tw.org - trying to solve this on my own
> for a long time - and I know that the solution MUST be trivial - .
> Please tell me what to write to fetch tiddlers tagged with this
> tiddlers title.
> I'm using it in this context - wanting to make a template that changes
> results depending on the tiddlers title:
>
> Template:
> <<forEachTiddler
> where
> 'tiddler.tags.contains("
> this tiddlers title <- This is what I need - What is the correct
> syntax/word for fetching it??
> ") && tiddler.data("Navn")'
> sortBy 'tiddler.data("Navn")'
> write
> '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
> [["+tiddler.data("Gang")+"]]|[["+tiddler.data("Værelse")
> +"]]|"+tiddler.data("Dato")+"|\n" : ""'
> begin '"|sortable|k\n|!#|Navn|Gang|Værelse|SDD|h\n"'
> end 'count+" elever i kontaktgruppen\n"'
> none '"Ingen elever i kontaktgruppen\n"'
>
> <<snapshot print label:Udskrift prompt:Udskriv id:viewer>><<fontSize>>
>
> YS Måns Mårtensson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---