Scot
October 5, 2021, 11:59am
1
Can anyone please help me figure out what I’m doing wrong.
I am trying to transclude this filter into a recipe tiddler.
I want the filter to produce a field in the current tiddler (the one transcluding the checkboxes) from a selected or selection of spices.
<$list filter="[tag[ingredient]tag[spice]sort[title]]">
<$checkbox field="{{!!title}}" checked=" {{!!title}}" unchecked="" default=""> {{!!title}}</$checkbox>
</$list>
Thanks in advance
Scot
Mark_S
October 5, 2021, 2:10pm
2
Unless something changed in 5.2.0, those transclusions should not be wrapped in strings. e.g. you want field={{!!title}}
Scot
October 5, 2021, 3:46pm
3
Thanks Mark_S
removing the quotes makes the resultant field but it also adds value as fieldname
I also want the field to be added to the Tiddler with the transclusion not the original filtered Tiddler.
Do I need to add currentTiddler to the filter
Chinese Five Spice.json (5.3 KB)
spice.json (5.4 KB)
Check Blank 3.json (6.5 KB)
Scot
Mark_S
October 5, 2021, 3:56pm
4
Hi Scot,
How did you create those JSON files? They all fail to import. When I look at them, they seem to contain HTML.
Mark_S
October 5, 2021, 4:00pm
5
Anyway, in your list use something like variable=“spice”.
Then in your checkbox, change {{!!title}} to <<spice>> everywhere. Now the changes should happen to your current tiddler, and not the ingredient tiddler.
Scot
October 5, 2021, 4:04pm
6
I used export tiddler from More dropdown but I have been having problems importing any tiddlers I have exported from one TW to any of my other TW’s.
Tiddler Check Blank 3
<<subsume “fruit”>>
<<subsume “vegetable”>>
<<subsume “meat”>>
<<subsume “poultry”>>
<<subsume “spice”>>
<$list filter=“[tag[Recipe]]”>
<$set name=“ingredients” filter=“[fields ] -[[title]] -[[tags]] -[[text]] -[[created]] -[[modified]] -[[serves]]”>
INGREDIENTS: <$text text={{{ [enlistjoin[, ]] }}}/>
To serve
<$edit-text tiddler=“$:/temp/people” tag=“input” focus=“yes” default=“” placeholder={{!!serves}} />,
you will need:
<$vars people={{{ [{$:/temp/people}!match else{!!serves}] }}}>
<$list filter=<> variable=“ingredient”>
<$vars amount={{{ [getmultiply[1]] }}}>
<$vars units={{{ [getremoveprefix] }}}>
<$text text={{{ [divide{!!serves}multiply] }}}/><> of <>
</$vars>
</$vars>
</$list>
</$vars>
</$set>
</$list>
Tiddler spice
<$list filter=“[tag[ingredient]tag[spice]sort[title]]”>
<$checkbox field={{!!title}} checked={{!!title}} unchecked=“” default=“”> {{!!title}}</$checkbox>
</$list>
Tiddler Chinese Five Spice
tagged with ingredient and with spice
I have removed a blockquote from around </vars people ..</$vars>
Mark_S
October 5, 2021, 4:07pm
7
What version of TW are you on? You might have discovered a bug.
Scot
October 5, 2021, 4:09pm
8
5.1.23 contains the tiddlers I am showing you.
Scot
Scot
October 5, 2021, 4:11pm
9
Mark_S
see my previous post for edit showing tiddler content
Scot
Mark_S
October 5, 2021, 4:15pm
10
Inside a list widget the output is always currentTiddler UNLESS you specify a variable.
<$list filter="[tag[ingredient]tag[spice]sort[title]]" variable="spice">
<$checkbox field=<<spice>> checked=<<spice>> unchecked="" default=""> <<spice>></$checkbox>
</$list>
I would consider using “yes/no” for the spice field though.
Maybe this is a copy paste error. AFAIK, there is no enlistjoin operator.
Scot
October 5, 2021, 4:37pm
11
I dragged tiddlers from 5.1.23 TW to https://tiddlywiki.com/ and then exported as JSON file.
Chinese Five Spice.json (5.3 KB)spice.json (5.4 KB)
Check Blank 3.json (6.5 KB)
I want Check Blank 3 Tiddler to be updated with the new field, at present it updates spice tiddler
Mark_S
October 5, 2021, 4:43pm
12
The files seem to be packed with javascript related to geolocation. Do you have anything related to geo in your plugins?
Scot
October 5, 2021, 4:49pm
13
I dont think so, although I did try a google maps TW a while back, that might be it
Mark_S
October 5, 2021, 4:52pm
14
Well, check your plugins list. You really don’t want to be injecting javascript into other people’s code!
You might try exporting the tiddlers as tid files.
Scot
October 5, 2021, 4:54pm
15
I will export as .tid files into new 5.2.0 TW and see if that’s any better
Thanks
Mark_S
Scot
October 5, 2021, 4:59pm
16
Mark_S
here are the exported .tid files
I have not imported them into a new 5.20.0 yet
Do they still contain javascript stuff
Check Blank 3.tid (6.4 KB)
Chinese Five Spice.tid (5.3 KB)
spice.tid (5.4 KB)
How can I tell if any other tiddlers contain it?
Scot
Mark_S
October 5, 2021, 5:14pm
17
Yes. what plugins do you have?
Hmm. Do you have any browser extensions that might be inserting code?
This is a post formatting error. Discourse is parsing variable references which causes them to disappear from the rendered output.
For example, the line you reference should appear as: <$text text={{{ [enlist<ingredients>join[, ]] }}}/>, but because of Discourse parsing, the <ingredients> syntax is omitted.
To properly render the posted code, it should be enclosed in a “code block” (i.e., preceded and followed by separate lines containing tripled backticks (```).
Scot
October 5, 2021, 5:24pm
19
encryptTiddler
ticklers GSD5 Tickler plugin
kookma plugins
searchwikis
solution
toc TOC
Shiraz
Tiddler Commander
Timelines
Todolist
utility
subsume-giffmex
simple search - telmiger
DetailsWidget-telmiger
Link to Tabs
QR Code
Relink
Key-values wikilabs
Mobiledragdrop
Scot
October 5, 2021, 5:28pm
20
@EricShulman
thanks Eric my mistake, I should indeed enclose code in backticks
<$text text={{{ [enlist<ingredients>join[, ]] }}}/>
regards
Scot